cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurent Marchal <lmarc...@smaeur.com>
Subject Queries order on commit.
Date Fri, 18 Jul 2008 14:10:21 GMT
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...
    Is there a way to force cayenne to do DELETE  before all others 
operations when a commit occurs ?
    What means the "snapshot version changed, don't know what to do" 
messages ?

Thanks.
Laurent Marchal.

#
# LOG
#

--- will run 2 queries.
--- transaction started.
INSERT INTO dbo.SNAME_AUX (SAFC, SASEQNO, SAVALUE, SKDID) VALUES (?, ?, 
?, ?)
[batch bind: 1->SAFC:112, 2->SASEQNO:2, 3->SAVALUE:'1', 4->SKDID:505]
[batch bind: 1->SAFC:112, 2->SASEQNO:1, 3->SAVALUE:'352', 4->SKDID:505]
[batch bind: 1->SAFC:112, 2->SASEQNO:0, 3->SAVALUE:'517', 4->SKDID:505]
=== updated 3 rows.
DELETE FROM dbo.SNAME_AUX WHERE SAFC = ? AND SASEQNO = ? AND SKDID = ?
[batch bind: 1->SAFC:112, 2->SASEQNO:1, 3->SKDID:505]
=== updated 2 rows.

snapshot version changed, don't know what to do... Old: 
org.apache.cayenne.DataRow@fe8153[values={SASEQNO=0, SAVALUE=517, 
SAFC=112, SKDID=505}, version=-9223372036854712970, 
replaces=-9223372036854775808], New: 
org.apache.cayenne.DataRow@dc8f6d[values={SASEQNO=0, SAVALUE=517, 
SAFC=112, SKDID=505}, version=-9223372036854712775, 
replaces=-9223372036854775808]

snapshot version changed, don't know what to do... Old: 
org.apache.cayenne.DataRow@4c72e3[values={SASEQNO=2, SAVALUE=1, 
SAFC=112, SKDID=505}, version=-9223372036854712971, 
replaces=-9223372036854775808], New: 
org.apache.cayenne.DataRow@10aca93[values={SASEQNO=2, SAVALUE=1, 
SAFC=112, SKDID=505}, version=-9223372036854712777, 
replaces=-9223372036854775808]

postSnapshotsChangeEvent: [SnapshotEvent] source: 
org.apache.cayenne.access.DataRowStore@1f0cbfb, deleted 1 id(s), 
indirectly modified 1 id(s)

Mime
View raw message