Hibernate version:
1.2.0.CR1
Hello all...
My mapping documents:
Code:
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="X" table="tblX" lazy="false">
<id name="IdX" column="id" type="Int32" unsaved-value="0">
<generator class="identity"/>
</id>
<bag name="lpath" generic="true" access="field" table="tblY" inverse="true" lazy="false" cascade="all-delete-orphan">
<key column ="IdX"></key>
<one-to-many class ="Y" />
</bag>
</class>
</hibernate-mapping>
The insert works great...
The problem occurs when I try to update the X class...
To do that, first I load a X´s entity :
...
X _x = session.Load(persitentType,id);
...
After that I change my path´s list (lPath), like that :
Code:
List<Path> _l = (List<Path>)Session["PATH_LIST"];
_x.Path.Clear();
_x.Path = _l;
session.SaveOrUpdate(_x);
So, I got the following error:
a different object with the same identifier value was already associated with the session: 1, of class: Y
Any ideas?
ty