I’ve been wondering this as well in the past. Now I’ve just accepted it. That’s simply how nh works.
Remember that the association between parent-child is considered to be “own”/handled by the parent. In your case, I think something like this is happening when creating the sql… 1. Insert the parent 2. Insert the child. The association to the parent, this child doesn’t know anything about. In other words – it can’t produce sql for it. 3. “Back” to the parent again to fix the association – update occurs If you use “inverse” on the parent’s one-to-many, you say that this one is not responsible for the association -> the child is - > you will gain an update (and can set not-null=true if you want to). /Roger From: nhusers@googlegroups.com [mailto:nhus...@googlegroups.com] On Behalf Of Krzysztof Kozmic Sent: den 12 maj 2009 08:21 To: nhusers@googlegroups.com Subject: Re: SV: [nhusers] Superfluous update? Thanks guys for the links, I've read them carefully. However I'm still not convinced when it comes to the additional update. I see no reason why what it does cant be performed in the insert in the first place. As in the Roger's link - it may even be reasonable to put a not-null="true" on the association. Krzysztof Fabio Maulo pisze: 2009/5/11 Roger Kratz <roger.kr...@teleopti.com<mailto:roger.kr...@teleopti.com>> http://www.cs.bham.ac.uk/~aps/syllabi/2004_2005/issws/h03/hibernate.html#one_to_many_unidir<http://www.cs.bham.ac.uk/%7Eaps/syllabi/2004_2005/issws/h03/hibernate.html#one_to_many_unidir> Sure that part of H3 doc is more clear of our http://nhforge.org/doc/nh/en/index.html#collections-bidirectional We should update our documentation in some moment. Thanks Roger. -- Fabio Maulo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com To unsubscribe from this group, send email to nhusers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---