Hi guys,
the following scenario doesn't work...
Code:
@Entity
@DiscriminatorColumn()
public abstract class User{
@OneToMany(mappedBy="id.user")
private List<Langs> langs
}
@Entity
public class Langs{
@Id private LangId id;
}
@Embedable
public class LangId{
private int id;
@ManyToOne @JoinColumn(name="user_id" , refere..="id")
private User user;
}
In the new version of hibernate I get an exception:
Quote:
org.hibernate.AnnotationException: mappedBy reference an unknown target entity property: User.id.company in User.lang
any suggestions? It's clear the scenario where you want composite keys and the mapping must exist inside the composite key definition.
regards
\n\m