Thanks, Jeff
I don't know if it is related or not, but I've also had problems in the
past when I try to create a new parent and several child objects related
to that parent all at once and then try to commit. The problem looks
like Cayenne is INSERTing the child records into the database first,
before the parent record, and the database complains that the children
have an invalid foreign key (and, yes, I have the ON UPDATE and ON
DELETE rules for the foreign key set to DO NOTHING and I still get the
error from PostgreSQL). To get around it I just committed the parent
first, then committed all the children.
- Parent/Child Insert ordering (was: Caching problem?) Jeff de Vries
- Re: Parent/Child Insert ordering (was: Caching prob... Tomi NA
- Re: Parent/Child Insert ordering (was: Caching ... Marcin Skladaniec
- Re: Parent/Child Insert ordering (was: Cach... Andrus Adamchik
- Re: Parent/Child Insert ordering (was: ... Jeff de Vries
- Re: Parent/Child Insert ordering (was: ... Jeff de Vries
- Re: Parent/Child Insert ordering (... Jeff de Vries
- Re: Parent/Child Insert ordering (was: ... Borut BolĨina
- Re: Parent/Child Insert ordering (... Andrus Adamchik
- Re: Parent/Child Insert ordering (... Andrus Adamchik
