> > This is what Cayenne does. So there is really no cycle, and Cayenne still > can't guess the order, this may be a bug. >
Hi Andrus, Unfortunately, this is not true. In AshwoodEntitySorter, all entities in circle are put to same ComponentRecord. Existence of instances of all entities in circle So their comparison at commit brings 0. Therefore records will be inserted in the same order they are registered in context (I'm not sure, or maybe the order is just unpredictable). So this causes an insertion error: Imagine references avaliable A->B->C->A 1. Create dependant entity B 2. Create master entity A 3. b.setA(a) 4. Commit. C is even never used. Andrey
