Ok.
I recompiled persistent with new changes. All works how i want and expect.But now insertBy function are not so safe as earlier.
The insertBy function checks only unique constrains defined on yesod framework level via Unique... constructions .
Now insertBy function throws exception if we try to insert 'bad' value to column with foreign constraint.
Please show me how to catch exception.
I think it would something like:
import qualified Control.Exception.Control as E
...
do
res <- runDB $ E.catch (insertBy offer) (\_ -> return Left ())
But my exception handler is wrong.
Thanks.
--
Best regards,
Cheshkov Anton
Phone: +7 909 005 18 82
Skype: cheshkov_anton