I have a base class defined as follow:
@MappedSuperclass
public abstract class BaseUser {
@ElementCollection(fetch = FetchType.EAGER)
@CollectionTable(name = "user_tags",
joinColumns = {
@JoinColumn(name = "owner_id", referencedColumnName= "tagName")})
public Set<String> getTags() {...}
And a bunch of derived user classes which extends BaseUser.
With Hibernate a single “user_tags” table was created for all the derived classes (which was what I wanted).
After moving to EclipseLink it seems the engine tried to add the “owner_id” and the “tagName” columns over and over as the number of the derived classes which obviously result with table creation failure.
Is there a way to get the same behavior as Hibernate in EclipseLink?
What does the JPA spec expects in such a scenario?
Seems like a bug. Please log the bug and vote for it.
It may have been fixed already, so please also try the latest version.