cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey Razumovsky <>
Subject Re: Circle references
Date Fri, 10 Jul 2009 08:20:19 GMT
> 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

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.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message