Hello,
you use @idClass. Whereas in my code I use @Embeddable and @EmbeddedId I thus seek a
solution with my problem of joint for the following code:
@Embeddable
| public class TermProjPK implements Serializable {
| private String auiw;
| @Column(name = "AUIS", nullable = false)
| private String auis;
public class TermProj implements Serializable {
| @EmbeddedId
| private TermProjPK termProjPK;
| //jointure avec la table TermSource
| @ManyToOne
| @JoinColumn (name = "AUIW")
| private TermSource auiw;
| public TermSource getAuiw() {
| return auiw;
| }
|
| public void setAuiw(TermSource auiw) {
| this.auiw = auiw;
| }
|
|
| //jointure avec la table SnomedInter
| @ManyToOne
| @JoinColumn (name = "AUIS")
| private SnomedInter auis;
| public SnomedInter getAuis() {
| return auis;
| }
|
| public void setAuis(SnomedInter auis) {
| this.auis = auis;
| }
| @Column(name = "MODIF")
| private String modif;
|
| @Column(name = "SRC", nullable = false)
| private String src;
public class TermSource implements Serializable {
| @Id
| @Column(name = "AUIW", nullable = false)
| private String auiw;
| @OneToMany(mappedBy="AUIW")
| private Collection<TermProj> termProjs;
|
| public Collection<TermProj> getTermProjs() {
| return termProjs;
| }
|
| public void setTermProjs(Collection<TermProj> termProjs) {
| this.termProjs = termProjs;
| }
public class SnomedInter implements Serializable {
| @Id
| @Column(name = "AUIS", nullable = false)
| private String auis;
| @OneToMany(mappedBy="AUIS")
| private Collection<TermProj> termProjs;
|
| public Collection<TermProj> getTermProjs() {
| return termProjs;
| }
|
| public void setTermProjs(Collection<TermProj> termProjs) {
| this.termProjs = termProjs;
| }
I have the error message according to
org.hibernate.AnnotationException: mappedBy reference an unknown property:
ejb.entity.TermProj.AUIS in ejb.entity.SnomedInter.AUIS
| ,
thank you in advance
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991294#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...