Thanks Kenneth, That link you mentioned explains it pretty well. Regards, Nabeel
On May 13, 4:34 pm, TigerShark <kenneth.siew...@gmail.com> wrote: > This is also a very nice > explanationhttp://www.emadashi.com/index.php/2008/08/nhibernate-inverse-attribute/ > > On 12 Maj, 18:33, Nabeel <nabeelfa...@gmail.com> wrote: > > > > > > > Hi guys, > > > I am exploring Fluet NHibernate and I have not used NHibernate before. > > I would like to know what is the purpose ofInverse() method. > > > In the example on wiki. it is stated > > > "Inverseon HasMany is an NHibernate term, and it means that the other > > end of the relationship is responsible for saving." > > > But even if I remove theInverse() from the StoreMap in the following > > statement > > > HasMany(x => x.Staff) > > .Inverse() > > .Cascade.All(); > > > it still works and generate the same sql. > > > Also, Store has one-to-many on Employee, so how come employee be > > responsible for saving itself? It needs a StoreId as its foreign key > > rite, so it should be the other way round i.e. Store should be > > responsible for saving employee ? > > > I am lost? The strange thing is even after removing it, the example > > works as it is. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Fluent NHibernate" group. > > To post to this group, send email to fluent-nhibern...@googlegroups.com. > > To unsubscribe from this group, send email to > > fluent-nhibernate+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/fluent-nhibernate?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Fluent NHibernate" group. > To post to this group, send email to fluent-nhibern...@googlegroups.com. > To unsubscribe from this group, send email to > fluent-nhibernate+unsubscr...@googlegroups.com. > For more options, visit this group > athttp://groups.google.com/group/fluent-nhibernate?hl=en. -- You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to fluent-nhibern...@googlegroups.com. To unsubscribe from this group, send email to fluent-nhibernate+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en.