cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey Razumovsky <razumovsky.and...@gmail.com>
Subject Re: Circle references
Date Fri, 10 Jul 2009 08:21:22 GMT
Not finished a statement in the middle, I meant "Existence of instances of
all entities in circle is never used during commit"

2009/7/10 Andrey Razumovsky <razumovsky.andrey@gmail.com>

> 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
>
>
>

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