> I think Cayenne is very intelligent and know the correct
> order to execute the statements, doesn't it?

It does, but
a) bugs have been reported for the code that does the ordering, so Cayenne may 
or may not work for you (I don't know the bug fix status for this one);
b) there is no correct order for interdependent entities.

I don't know whether Cayenne sorts rows or tables.
E.g. a table with a parent_id column will probably have a table cycle (the 
foreign key constraint refers to the same table), but not a row cycle (there's 
still a valid order if you commit after each INSERT). If Cayenne sorts tables, 
it won't know how to order row inserts/updates/deletes even though a correct 
ordering always exists.

Reply via email to