Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Composite primary keys without @IdClass ?

I have a few entities with composite primary keys, and the fields are defined as entities themselves with @ManyToOne annotations.  The schema that is generated is a table with both columns defined as foreign keys, and a composite primary key defined on both columns. I also have a separate PK class for the entity which defines the properties and is serializable w/ hashCode and equals methods implemented, etc, etc... per the spec.

What is interesting to me is that I just realized... while this has been working for the entities for awhile, the entities do not have @IdClass which is supposed to be there and refer to the PK class.

Is it the case that the spec requires @IdClass but eclipselink does not enforce it?

Thanks
- Phillip

Back to the top