David, The problem you are facing is the difference between inverse option and cascading options !!!
Specify inverse=true for each collection that you have a different mapping file for, this means that when the schema gets created he needs to investigate the underlying class for all constraints, fields etc !!! Cascade is synchronisation to db behavior, inverse has nothing to do with that. Kind regards On 5 aug, 15:44, Imajeep <[email protected]> wrote: > I am trying to understand the 'inverse' attribute. Reading from > 'NHibernate in Action' at the bottom of page 89: > > "By specifying inverse=true, you explicitly tell NHibernate which end > of [a bidirectional association] it should synchronize with the > database. In this example, you tell NHibernate that it should > propagate changes made at the Bid end of the association to the > database, ignoring changes made only to the bids collection. If you > only call item.Bids.Add(bid), no changes are made persistent." > > I'm puzzled by this statement. At the top of page 90, the book says > "When you instantiate a new bid and add it to an item, the bid should > become persistent immediately." > > The two statements seem to contradict each other. What does the first > statement, about ignoring changes to the bids collection, really mean? > Does it mean that if I delete a Bid from the bids collection, the > deletion won't be synchronized back to the database if I pass the item > to ISession.SaveOrUpdate()? > > Thanks for your help, > > David Veeneman > Foresight Systems --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
