Hi,
I'm currently moving from hibernate 3.1 to 3.2 to comply ejb3 spec etc. On 3.1 everything was working fine, but now I receive this exception:
org.hibernate.AnnotationException: mappedBy reference an unknown target entity property: be.fgov.onerva.hris.bo.IndividualData.rrnr1 in be.fgov.onerva.hris.bo.Agent.individualDataList
I have 2 relational tables, here is the summary :
Code:
COMMON_DATA_INDIVIDUAL{RRNR1,VALUEDATE,...}
COMMON_UNVERSIONABLE_DATA{RRNR1,...}
here are the mapping :
Code:
@Entity
@AccessType("field")
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "COMMON_DATA_INDIVIDUAL")
@IdClass(VersionableDataAgentPk.class)
public class IndividualData implements Serializable {
@Id
@ManyToOne
private Integer rrnr1;
@Id
private Date valueDate;
Code:
@Embeddable
@AccessType("field")
public class VersionableDataAgentPk implements Serializable {
@Basic
@Column(name = "RRNR1")
private Integer rrnr1;
@Basic
@Column(name = "VALUE_DATE", nullable = false)
private Date valueDate;
Code:
@Entity @AccessType("field")
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "COMMON_UNVERSIONABLE_DATA")
public class Agent implements Serializable {
@Id
@Column(name = "RRNR1")
private Integer rrnr1;
@OneToMany(mappedBy = "rrnr1")
@JoinColumn(name = "RRNR1")
@MapKey(name = "valueDate")
@OrderBy(value = "valueDate")
private Map<Date, IndividualData> individualDataList;
I try to set the targetEntity in the OneToMany, but that changes nothing...
rrnr1 is well in the IndividualData table... bu it can't find it ???
Any idea ?
Many thanks,
Vince.