Refresh Your Java - Before Java Interview
We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....
Essentially "inverse" indicates which end of a
relationship should be ignored, so when
persisting a parent who has a collection of children, should you
ask the parent for its
list of children, or ask the
children who the parents are ?
Here is how you set
this parameter in a <many-to-one> relation.
Child
:
<hibernate–mapping>
<class name="Child"
table="child">
<many–to–one
name="parent"
class="Parent"
column="parent_id"/>
</class>
</hibernate–mapping>
Parent :
<hibernate–mapping>
<class name="Child"
table="child">
<bag
name="children" inverse="true"
cascade="save–update">
<key
column="parent_id"/>
<one–to–many
class="Child"/>
</bag>
</class>
</hibernate–mapping>
This Portal is intended to put all Java/J2ee related topics at one single place for quick referance, not only Technical , but also the Project Management Related thing such as Development Process methodoogies build process, unit testing etc.,
This Portal has More than 500 Java Interview Questions (also could be Considered as Quick Notes) very neatly separated topic by topic with simple diagrams which makes you easily understandable. Importantly these are from our Realtime expericance.