Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] id-validation and persist()

I have an entity whose ID is supposed to be generated using the TABLE strategy.

I have recently set id-validation to NULL in production, because there are some other entities that I have for which ids are NOT generated, and for which 0 is an acceptable primary key.  I don't want EclipseLink telling me that 0 is invalid.

But after this, the persist() operation on my entities that feature table-generated IDs seems to be blindly trying to insert entities with a primary key value of 0, which--given that my entity's primary key value is 0 to start because I don't ever set it--means that it is ignoring the fact (all of a sudden as a result of this id-validation change) that it should be using the generator to generate new ID values.

Before I spend my day attempting to reproduce this in a test case I am curious to see if anyone else has had problems messing with id-validation.

Best,
Laird

--
http://about.me/lairdnelson


Back to the top