What is the "owning side" in an ORM mapping?
- by Yousui
Hi guys,
I'm new to JPA. Now I have a question that what exactly is the owning side mean? I only have a rough idea of it. Can someone give me an explanation with some mapping examples(one to many, one to one, many to one) please? Great thanks.
ps, the following text is excerpt from the decription of @OneToOne in java EE 6 documentation. You can see the concept owning side in it.
Defines a single-valued association to
another entity that has one-to-one
multiplicity. It is not normally
necessary to specify the associated
target entity explicitly since it can
usually be inferred from the type of
the object being referenced. If the
relationship is bidirectional, the
non-owning side must use the mappedBy
element of the OneToOne annotation to
specify the relationship field or
property of the owning side.