Forums Register Login

why do we need to specity the owner side of the relationship

+Pie Number of slices to send: Send
Hi All,
Can anybody tell me the idea of ownering in the bidirectional relationships?
Why the Entity Manager needs to know the owner side of the relationship?
your help is appreciated
+Pie Number of slices to send: Send
Hi Maizar,

maybe this could help you: EJB3 Entity Relationship


John
+Pie Number of slices to send: Send
Thanks John,
I read this thread before but actually I didn't find the answer to why knowing the owner side is helpful to the Entity Manager
now, I know how to use @mappedBy in the relationships but dont know why it exists at the first place
+Pie Number of slices to send: Send
Well, I'm not sure if there is a deeper meaning, I see it more as a convenient way of defining a bidirectional relation.

One reason I can imagine is that you somehow have to "link" both sides of a bidirectional relationship, if you use features like CASCADE, but this is just an idea.

+Pie Number of slices to send: Send
yea John I think using it when using cascade makes sense a bit .. only a bit
but I think there must be a deeper meaning for it otherwise they won't make it a mandatory element (isn't it mandatory in the bidirectional relationship?!)
+Pie Number of slices to send: Send
Wouldn't we have just two unidirectional relations when we don't use the mappedBy?
Weeds: because mother nature refuses to be your personal bitch. But this tiny ad is willing:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1164 times.
Similar Threads
Owner of the RelationShip
Uni-direction ManyTomany mapping with annotations
Hibernate and extra insert
@mappedBy
The word inverse in a Bidirectional Relationships
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 18, 2024 22:29:04.