I have a class that has maps a one-to-many relationship through a bag.
The class on the other end of the relation is set to 'mutable=false'.
When I add a class to the iList (the bag), a session.flush will actually create an insert statement for the mutable=false class. This is not at all how I would expect nhibernate to react. (inverse property has no impact)
1. Could someone define the working of mutable ?
(There is another one to many relationship on the mutable=false class that does need to get persisted).
2. If I set Cascading to none on the relationship, it does not try to insert the class. And it will insert the second relationship. However, during insert it will complain about having an unsaved transient object.
So the question is: why is a mutable = false still treated as a transient object, while it actually is not (it's only an easy object to bind relationships to)
|