cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Borut BolĨina <>
Subject oid as PK
Date Fri, 07 Jul 2006 04:52:50 GMT

in my model I have a table with attribute oid marked as Primary Key. I 
use AUTO_PK_SUPPORT table for PK generation. This table holds say 
100.000 records. In my business case I have to go over each of them and 
this process lasts even three days sometimes (a lot of work for each 
record - that is why). If this process is interrupted, I remember which 
record was last processed, so I can continue working from there on in 
the next run.

I broke the app when I introduced oid as class propery which I did for 
the following reason:
qual = qual.andExp(ExpressionFactory.greaterExp("oid", lastIndexedSource));

I broke it becouse the code for inserting now no longer works as oid is 
a required property. dataContext.commitChanges raises 
ValidationException. I would have to set oid within my code which I 
don't want to do, I have AUTO_PK_SUPPORT to do that.

Is there an equivalent way to construct a qualifier for the expression 
which would return records with primary keys (oids) greater than some value?


View raw message