What would cause the following exception (latest cvs checkout)?
It doesn't seem to happen deterministically. I'm converting data
records from one format to another, reading a set of records in, and
then creating new set of records to write out.
The first record always seems to work. Then I always get this error
soon afterward. Sometimes on the second set of records, sometimes a
few later. On this particular run, I got it 5 record sets into the
conversion.
I dumped all of the uncommitted objects in the datacontext before
doing the saveChanges, and that's what the "Leftover object" messages
are showing.
I've edited the attributes, hopefully leaving only the relevent ones.
To the best of my knowledge, the Join in question is the relationship
from <ObjectId:WomsWork, TEMP:00004C96C5030161> to
<ObjectId:StatusableWork, TEMP:00004D96C5030161>, both of which exist
and are in state new.
This relationship is in my DataMap as
<db-relationship name="statusableWork" source="WOMS_WORK"
target="STATUSABLE_WORK" toMany="false">
<db-attribute-pair source="WOMS_WORK_ID" target="ID"/>
</db-relationship>
The reverse relationship is in another DataMap as
<db-relationship name="womsWork" source="STATUSABLE_WORK"
target="WOMS_WORK" toDependentPK="true" toMany="true">
<db-attribute-pair source="ID" target="WOMS_WORK_ID"/>
</db-relationship>
And the id for WOMS_WORK is dependent on the ID for STATUSABLE work
(which is in turn dependent upon the ID for WORK -- vertical
inheritance)
[I changed toMany from true to false in the second db-relationship as
that was an error I just noticed, but it hasn't made any difference].
Leftover new object: {<ObjectId:Contact, TEMP:00005496CDEC0161>; new;
Leftover new object: {<ObjectId:StatusableWork,
TEMP:00005D96CEF60161>; new; [parentWork=>{<ObjectId:Work,
TEMP:00004E96C5030161>}; work=>{<ObjectId:Work,
TEMP:00005E96CEF60161>}; ]}
Leftover new object: {<ObjectId:Work, TEMP:00004E96C5030161>; new;
[workType=>{<ObjectId:WorkType, ID=1042>};
statusableWorkList=>{<ObjectId:StatusableWork,
TEMP:00004D96C5030161>}; ]}
Leftover new object: {<ObjectId:StatusableWork,
TEMP:00004D96C5030161>; new; [work=>{<ObjectId:Work,
TEMP:00004E96C5030161>}; ]}
Leftover new object: {<ObjectId:Fee, TEMP:00005296CAEF0161>; new;
Leftover new object: {<ObjectId:ContactName, TEMP:00005396CDEC0161>; new;
Leftover new object: {<ObjectId:Work, TEMP:00005B96CEF60161>; new;
[workType=>{<ObjectId:WorkType, ID=1056>};
statusableWorkList=>{<ObjectId:StatusableWork,
TEMP:00005A96CEF60161>}; ]}
Leftover new object: {<ObjectId:StatusableWork,
TEMP:00005A96CEF60161>; new; [parentWork=>{<ObjectId:Work,
TEMP:00004E96C5030161>}; work=>{<ObjectId:Work,
TEMP:00005B96CEF60161>}; ]}
Leftover new object: {<ObjectId:FeePaymentReceipt, TEMP:00005196CAEF0161>; new;
Leftover new object: {<ObjectId:Address, TEMP:00005596CE0C0161>; new;
Leftover new object: {<ObjectId:Work, TEMP:00005E96CEF60161>; new;
[statusableWorkList=>{<ObjectId:StatusableWork,
TEMP:00005D96CEF60161>}; ]}
Leftover new object: {<ObjectId:WomsWork, TEMP:00004C96C5030161>; new;
[statusableWork=>{<ObjectId:StatusableWork, TEMP:00004D96C5030161>};
]}
Leftover new object: {<ObjectId:StatusHistory, TEMP:00004F96C5030161>; new;
Leftover new object: {<ObjectId:StatusableWork,
TEMP:00005896CE1B0161>; new; [parentWork=>{<ObjectId:Work,
TEMP:00004E96C5030161>}; work=>{<ObjectId:Work,
TEMP:00005996CE1B0161>}; ]}
Leftover new object: {<ObjectId:Phone, TEMP:00005796CE1B0161>; new;
Leftover new object: {<ObjectId:WorkAssignee, TEMP:00005C96CEF60161>;
new; [statusableWork=>{<ObjectId:StatusableWork,
TEMP:00005A96CEF60161>}; seq=>1; role=>{<ObjectId:SecRole,
ID=20527>}]}
Leftover new object: {<ObjectId:Fee, TEMP:00005096CAEF0161>; new;
Leftover new object: {<ObjectId:WorkAssignee, TEMP:00005F96CEF60161>;
new; [statusableWork=>{<ObjectId:StatusableWork,
TEMP:00005D96CEF60161>}; seq=>1; role=>{<ObjectId:SecRole,
ID=21466>}]}
Leftover new object: {<ObjectId:Work, TEMP:00005996CE1B0161>; new;
[statusableWorkList=>{<ObjectId:StatusableWork,
TEMP:00005896CE1B0161>}; ]}
Leftover new object: {<ObjectId:Address, TEMP:00005696CE1B0161>; new;
Leftover modified object: {<ObjectId:WorkType, ID=1042>; modified;
Leftover modified object: {<ObjectId:StateProvince,
STATE_PROVINCE_ID=1>; modified;
Leftover modified object: {<ObjectId:WorkType, ID=1053>; modified;
Leftover modified object: {<ObjectId:WorkType, ID=1057>; modified;
Leftover modified object: {<ObjectId:Status, ID=112>; modified;
Leftover modified object: {<ObjectId:WorkType, ID=1056>; modified;
org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2-dev April 10
2006] Some parts of FK are missing in snapshot, join:
org.objectstyle.cayenne.map.DbJoi..c898a[source=WOMS_WORK_ID,target=ID]
at org.objectstyle.cayenne.access.DataNodePKGenerationAction.appendPkFromMasterRelationships(DataNodePKGenerationAction.java:250)
at org.objectstyle.cayenne.access.DataNodePKGenerationAction.createPermIdsForObjEntity(DataNodePKGenerationAction.java:143)
at org.objectstyle.cayenne.access.DataNodeInsertBucket.createPrimaryKey(DataNodeInsertBucket.java:97)
at org.objectstyle.cayenne.access.DataNodeFlushAction.createPK(DataNodeFlushAction.java:106)
at org.objectstyle.cayenne.access.DataDomainFlushAction.preprocess(DataDomainFlushAction.java:217)
at org.objectstyle.cayenne.access.DataDomainFlushAction.flush(DataDomainFlushAction.java:148)
at org.objectstyle.cayenne.access.DataDomain.onSyncFlush(DataDomain.java:778)
at org.objectstyle.cayenne.access.DataDomain$2.transform(DataDomain.java:749)
at org.objectstyle.cayenne.access.DataDomain.runInTransaction(DataDomain.java:804)
at org.objectstyle.cayenne.access.DataDomain.onSync(DataDomain.java:746)
at org.objectstyle.cayenne.access.DataContext.flushToParent(DataContext.java:1217)
at org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.java:1121)
This archive was generated by hypermail 2.0.0 : Mon Apr 10 2006 - 21:56:59 EDT