cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurent Marchal <lmarc...@smaeur.com>
Subject Re: Queries order on commit.
Date Fri, 18 Jul 2008 14:53:20 GMT
Ok i will try to modify the object directly, and see the results.
I will post code if this doesn't work.

Andrus Adamchik wrote:
>
> On Jul 18, 2008, at 5:10 PM, Laurent Marchal wrote:
>
>> Hi !
>>
>> I would like to do some DELETEs and INSERTs in one transaction, but 
>> since DELETE is made after the INSERTs, it deletes the fresh inserted 
>> values...
>
> Yeah, weird. Could you post some sample code? Looking at your log, you 
> delete a dependent object from a relationship, and then readd a new 
> one? IMO the solution should be modifying the existing object instead 
> of doing delete/insert.
>
>
>>   Is there a way to force cayenne to do DELETE  before all others 
>> operations when a commit occurs ?
>
> The ordering algorithm is based on the changed objects graph 
> dependency analysis, to provide ordering consistent with FK 
> constraints. It does not address a scenario of object identity (PK) 
> disappearing and then reappearing again. There is probably a way to 
> customize it (although likely not an easy one), but I still feel like 
> this is not a valid case.
>
> Andrus
>
>
>

Mime
View raw message