Community
Participate
Working Groups
Build Identifier: 2.3.0.v20110604-r9504 EclipseLink always uses the default name for a @PrimaryKeyJoinColumn even the column name is specified in the annotation. Reproducible: Always
Can you provide more details? How is your class mapped? Can you provide a snippet of your code?
public class User { @Id @Column(name = "cid") private String id; } public class Role { @Id @Column(name = "cid") private String id; } public class UserRole { @Id @PrimaryKeyJoinColumn(name = "cuserid") private User user; @Id @PrimaryKeyJoinColumn(name = "croleid") private Role role; } In this case EclipseLink assumes: cuserid column name as USER.cid croleid column name as ROLE.cid Hope helps.
A derived id mapping should use JoinColumn and not PrimaryKeyJoinColumn.
Targeting as P4 future. Eclipselink could log a warning in this case.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink