What is the "owning side" in an ORM mapping?
Posted
by Yousui
on Stack Overflow
See other posts from Stack Overflow
or by Yousui
Published on 2010-05-01T11:11:47Z
Indexed on
2010/05/01
11:17 UTC
Read the original article
Hit count: 304
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.
© Stack Overflow or respective owner