Search code examples
haskellyesodhaskell-persistent

Yesod return whole Entity after insert?


Basically right now I run fbId <- runDB $ insert myNewFooBar and I get back a Key FooBar. Is there any way to return the value of the whole FooBar directly from an insert without running a separate query of runDB $ get404 fbId after?


Solution

  • I just build the Entity Haskell-side: Entity fbId myNewFooBar.