@GeneratedValue on non-id fields

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

@GeneratedValue on non-id fields

William Dazey
I have been digging into EclipseLink's support of using @GeneratedValue annotations on non @Id fields and I cannot find any official documentation saying this is supported. In fact, the following excerpt seems to be the definitive statement on the subject:


"Use the @GeneratedValue annotation or <generated-value> XML element to enable the EclipseLink persistence provider to generate unique identifiers for entity primary keys (see @Id)."

However, I stumbled across the following ancient ECL bug where Guy Pelletier seems to state that EclipseLink does support the use of @GeneratedValue on non @Id fields (Basic fields like those found in @Embeddable classes)

Does this support extend to use of @SequenceGenerator on non @Id fields with @GeneratedValue? Can I get a definitive answer on if this is supported or not? Was there a feature that delivered this support?[hidden email]

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