I admit the "inverse" concept is a bit allusive - generally speaking I end up
using the following guidelines, and then testing to make sure it is saving the way I want:
For bi-directional relationships, 1-M and M-M make sure you put the inverse attribute in the collection tag. For M-M it doesn't matter, but for 1-M it goes in the only collection tag involved in this relationship.
Inverse tells hibernate which end of the relationship to get information about the link... so if you put inverse="true" on your ONE side ie.
<class name="parent"> <!-- this is the ONE side -->
<set name="children" ...inverse="true">
</set>
Then you are telling hibernate that the "many" side ie, Child class is managing the "link" info (in a bi-directional association). In a non-bidirectional one-to-many, ie the parent just has many children, and the child object doesn't know about the parent - Hibernate just defaults to the right management, ie managed by the parent.
I hope this makes sense, and please, someone correct me if I am wrong or misleading with this.
Here is a quote from the docs:
section 1.3.6. Working bi-directional links in reference.pdf
Quote:
All bi-directional associations need one side as inverse. In a one-to-many association it has to be the many-side, in many-to-many association you can pick either side, there is no difference.
Sounds like your code is working. right???