Hello, i am trying to understand how Inverse() should be used and how it can somehow work in a Convention for the different join types in fluent nhibernate.
Does anyone have an example of a typical implementation of how to use Inverse ? Or is there no typical pattern of how it should be used ? I am having some difficulties figuring out how it should be used. As I understand it, Inverse() assigns the resposibility of saving the object to the other end of the join, which is also mentioned on the Fluent Nhibernate Wiki. Basically it means that the other side of the join is the parent/owner of the other object/s ? As far as i have been able to find out Inverse is always set to "false" on both sides per default in Hibernate, and it is not possible to set Inverse on the Reference mapping. Is defaults different in Fluent Nhibernate ? I guess in most cases the side with the HasMany or HasManyToMany join declaration is the one responsible for the other objects so Inverse should be set on the Reference which is not possible (- clearly i dont understand it correctly). When looking at the example from "Getting Started" on the Fluent Nhibernate page i get confused because Inverse() is set on the HasMany join declared for the Property "Staff" in the Store mappings. But looking at the database diagram the Employee (Staff) table have a relation to the Store table through the foreign key Store_id, which means that a Store needs to exist in order for the Employee to exist, therefore in my mind the Store object should have the responsibility of saving an Employee object. Fluent Nhibernate - Getting Started - http://wiki.fluentnhibernate.org/Getting_started#Mappings I clearly must be misunderstanding something about Inverse. Maybe it is the opposite of what i think? - That Inverse() should be set on the side that is responsible of saving the objects in the other end of the join ? Or maybe it means something else ? :) Martin ps. i guess how Inverse() works is more a Hibernate related question, but what i am trying to do is create a Fluent Nhibernate Convetion using it "correctly". -- 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.