2 Replies Latest reply on Mar 10, 2006 9:33 PM by mazz

    @ManyToOne mappedBy not allowed?

    mazz Master

      I'm sure there is a very good reason for this, I was hoping someone can fill me in.

      Why doesn't the specification allow me to specify "mappedBy" in the @ManyToOne relationship annotation?

      Suppose I have Individual and Family entities - a ManyToOne. Family has the OneToMany annotation and Individual has the ManyToOne annotation. If I want the bi-directional relationship to be owned by Family - I can't - the mappedBy isn't allowed in the ManyToOne annotation that I put in Individual.

      I'm sure I just don't understand this 100%... looking for an idiot lesson :-)

      I guess a definition of "owns a relationship" is probably in order... what does it mean when something "owns a relationship"?