Always inverse Mapping for bidirectional relations?

If you have a bidirectional mapping then it causes harm to not have one side inversed because if you have Cascade. All both sides would try to maintain the association meaning duplicate entries in link tables or redundant Updates.

Up vote 1 down vote favorite share g+ share fb share tw.

Java hibernate bidirectional inverse link|improve this question edited Mar 6 at 16:02 asked Mar 6 at 15:53Koray Güclü83.

If you have a bidirectional mapping then it causes harm to not have one side inversed because if you have Cascade. All both sides would try to maintain the association meaning duplicate entries in link tables or redundant Updates. Both sides as not updateable is useful for readonly associations.

Docs.oracle.com/javaee/5/api/javax/persistence/OneToMany.html states for MappedBy that "The field that owns the relationship. Required unless the relationship is unidirectional. ".

That means for bidirectional relations inverse is always required and cascade should be both on two sides right? – Koray Güclü Mar 7 at 15:13 "In a bidirectional relationship, one of the sides (and only one) has to be the owner: the owner is responsible for the association column(s) update. " REF:docs.jboss.org/hibernate/annotations/3.5... – Koray Güclü Mar 7 at 17:52 right the association is a column(or table in manytomany) in the database.

– Firo Mar 8 at 10:33 This can give more information to other people : docs.jboss.org/hibernate/orm/3.3/reference/en/html/… and docs.jboss.org/hibernate/orm/3.3/reference/en/html/… – Koray Güclü Mar 8 at 13:45 sleberknight.com/blog/sleberkn/entry/20070329 is also nice about this topic – Koray Güclü Mar 8 at 17:34.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions