[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[eclipselink-users] Regression 2.1.1 -> 2.2.0? @JoinColumn referencedColumnId
|
There might be a regression here.
My colleague has an entity (Person) that inherits from a mapped superclass. The mapped superclass defines an @Id column:
@Id
@Column(name = "id")
private int id;
Then the Person entity defines a unidirectional @OneToMany with a @JoinTable to another entity called EthnicityType. One of the @JoinTable's inverse columns needlessly specifies a referencedColumnId = "id":
@OneToMany(cascade=CascadeType.ALL, fetch = FetchType.EAGER)
@JoinTable(name = "Person_EthnicityType", joinColumns = { @JoinColumn(name = "personId", referencedColumnName = "id") }, inverseJoinColumns = { @JoinColumn(name = "ethnicity_type_id"/*,referencedColumnName = "id"*/) })
private Set<EthnicityType> ethnicityType=new HashSet<EthnicityType>();
EclipseLink 2.1.1 happily lets this fly. EclipseLink 2.2.0 as packaged in Glassfish 3.1-SNAPSHOT barks with this error:
Exception Description: The reference column name [id] mapped on the element [field ethnicityType] does not correspond to a valid field on the mapping reference.
Is there an obvious mapping problem here?
Thanks,
Laird