About Question enthuware.oce-jpad.v6.2.442 :
Posted: Fri Jan 23, 2015 11:02 am
You write:
(Remember that the Many side is always the owning in a OneToMany/ManyToOne relationship, so mappedBy is not required there.)
However, it seems this is only true for uni-directional OneToMany/ManyToOne relationships.
According to http://docs.oracle.com/javaee/6/api/jav ... oMany.html
"If the relationship is bidirectional, the mappedBy element must be used to specify the relationship field or property of the entity that is the owner of the relationship."
(Remember that the Many side is always the owning in a OneToMany/ManyToOne relationship, so mappedBy is not required there.)
However, it seems this is only true for uni-directional OneToMany/ManyToOne relationships.
According to http://docs.oracle.com/javaee/6/api/jav ... oMany.html
"If the relationship is bidirectional, the mappedBy element must be used to specify the relationship field or property of the entity that is the owner of the relationship."