Hi guys,

I am exploring Fluet NHibernate and I have not used NHibernate before.
I would like to know what is the purpose of Inverse() method.

In the example on wiki. it is stated

"Inverse on HasMany is an NHibernate term, and it means that the other
end of the relationship is responsible for saving."

But even if I remove the Inverse() 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 at 
http://groups.google.com/group/fluent-nhibernate?hl=en.

Reply via email to