[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.rt.eclipselink] Re: Negative Ids
|
I don't think currently singleton primitive negative ids are allowed
without the flag (non-primitive or composite are ok, 0 or negative).
Are you trying to allow negative ids on something that uses sequencing?
That would be odd, but if you allow 0, and have a primitive int/long id
then it will default to 0, so EclipseLink will think your two new objects
are the same object. You would need to use a Integer or Long so that the
value is null when not assigned, or remove the allow zero id flag. You
can also set allowing 0 as an id on a per class basis using the
@PrimaryKey and IdValidation settings,
See,
http://www.eclipse.org/eclipselink/api/1.1.1/org/eclipse/persistence/annotations/PrimaryKey.html