findOrCreate :: ( YesodPersist m
                , PersistUnique (YesodPersistBackend m (HandlerT m IO))
                , PersistEntity v
                , PersistMonadBackend (YesodPersistBackend m (HandlerT m IO)) ~ PersistEntityBackend v
                )
                => v -> HandlerT m IO (Key v)
findOrCreate v = return . either entityKey id =<< runDB (insertBy v)
findOrCreate :: ( YesodPersist m
                , PersistUnique (YesodPersistBackend m (HandlerT m IO))
                , PersistEntity v
                , PersistMonadBackend (YesodPersistBackend m (HandlerT m IO)) ~ PersistEntityBackend v
                )
                => v -> HandlerT m IO (Key v)
findOrCreate v = return . either entityKey id =<< runDB (insertBy v)
findOrCreate v = return . either entityKey id =<< runDB (insertBy v)