If you want to use inverse=true on your collection, I believe that the only way to do this is to set your foreign key column to nullable=true.
The reason is that inverse=true is telling NHibernate that the child object is resposible for managing it's own key reference, and what happens in the database is the child object is first INSERTed with it's foreign key set to NULL, and then a second UPDATE occurs which updates the foreign key to the correct value. With inverse=false, the child object is INSERTed with its foreign key set. I always go back to this post when I forget: http://ayende.com/Blog/archive/2009/01/18/nh-prof-new-feature-superfluous-ltmany-to-onegt-update.aspx -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
