cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff de Vries <>
Subject Parent/Child Insert ordering (was: Caching problem?)
Date Sat, 20 May 2006 01:38:53 GMT
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.


View raw message