| Summary: | @PrimaryKeyJoinColumn "name" attribute is ignored | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Ecmel Ercan <ecmel.ercan> |
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> |
| Status: | NEW --- | QA Contact: | |
| Severity: | normal | ||
| Priority: | P4 | CC: | guy.pelletier |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Ecmel Ercan
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 |