Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-dev] @GeneratedValue on non-id fields

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?

Back to the top