Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-dev] Review for 520387

Hi Will,

On 8/2/17 2:21 AM, William Dazey wrote:
I'd like to get a review for I would also like to know if this use case should be valid for EclipseLink. Reading the JPA spec, section 11.1.20, it states:

The use of the GeneratedValue annotation is only required to be supported for simple primary keys.
and section 11.1.17 says "The EmbeddedId annotation is applied to a persistent field or property of an entity class or mapped
superclass to denote a composite primary key that is an embeddable class."

Does my usecase qualify as a "simple primary key"?
No, as per 11.1.17 and also section 2.4: "The Id annotation or id XML element must be used to denote a simple primary key." - I see no @Id in your use-case.

or is this a complex primary key. I was able to create a fix for the issue, but I am unsure as to the ramifications of such a change. I would really appreciate any feedback.
to me it looks like support for the usage of @GeneratedValue on non-@Id fields is currently up to the provider but there is - and in its context your fix makes sense to me.


Will Dazey

eclipselink-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top