We are using Cayenne 3.1 M3 in production. We have just discovered that the 
primary keys being generated are being truncated to fit an int.

The sequence returns numbers like 5224748590. I've confirmed this by logging 
the return value of LongPkRange.getNextPrimaryKey.

But the inserts are using PKs like 929781294. 5224748590 - 2^32 = 929781294. 
Something is stripping off the high order bits of the primary keys. 

I've checked my model, there the primary key is Defined as Number(15) in the 
database, but it isn't defined as an attribute at all, so I can't specify the 
Java class to use for it.

Anyone have any suggestions?

Reply via email to