April 26, 2006

Inverse attribute of Hibernate

Writing about Hibernates bizarre interpretation of inverse ;) from Colin's blog

Think inverse as the “ignore”
inverse = true means to ignore the relationship of this side
inverse = false means not to ignore the relationship of this side

In parent-child relationship, parent is one side and children are many side.

one-to-many inverse=”false”
means relationship of parent side should not be ignored. So
parent.getChildren() will be examined, child.getParent() is ignored

For the following example:
Parent parentA = getParentA();
Parent parentB = getParentB();
child = new Child();
parentA.getChildren().add(child); Will be used
child.setParent(parentB); Will be ignored


- No comments Not publicly viewable


Add a comment

You are not allowed to comment on this entry as it has restricted commenting permissions.

Trackbacks

Search this blog

Search Warwick Blogs

 

Tags

Most recent comments

  • Do not have any idea on which topic I have to comment, I thinking t… by anemia on this entry
  • “logical standby failed to re–start, I am also getting … by anemia on this entry
  • thanks for give nice information for health.. by Appointment Setting on this entry
  • Thanks for the nice information because from last three days i am s… by robot vacuum on this entry
  • So what happen City speed dating when you tried this coding once in… by John Bergeron on this entry
Not signed in
Sign in

Powered by BlogBuilder
© MMX