[odb-users] Debugging FOREIGN KEY
Andrew Cunningham
andrew at a-cunningham.com
Sat Aug 29 17:37:22 EDT 2015
Hi Boris,
Hm, this is what I would do, assuming that you are trying to persist
> all related object before the object itself.
> 1. Switch to the immediate foreign keys (--fkeys-deferrable-mode options).
> Now you will get an exception immediately after the persist() call that
> has violated relationships.
This works great except there is a an annoying little issue. If you try to
persist an object, when a related object is not persistent you get a
" object_already_persistent" exception. I think the exception should be a
"object_not_persistent" exception if possible....
Andrew
More information about the odb-users
mailing list