Greetings,
I just switched over to the 1.2GA and am having trouble with existing code that worked before, but after I made my migration changes (this post means I must have missed one) I notice when I try to save an object with a many-to-many mapping it throws a NHibernate.TransientObjectException on session.SaveOrUpdateCopy
Here is the many-to-many mapping
<component name="Cities" class="MyComp.CityCol, MyComp">
<bag name="InnerList" cascade="none" lazy="true" table="`user-citylist`">
<key column="UserID" />
<many-to-many class="MyComp.City, MyComp" column="CityID" />
</bag>
</component>
Here is the cit mapping
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping default-access="property" xmlns="urn:nhibernate-mapping-2.2">
<class name="MyComp.City, MyComp" lazy="false" table="`citylist`">
<id name="ID" type="UInt32" unsaved-value="0">
<generator class="identity" />
</id>
<version name="Version" type="UInt32" />
<property name="EditTimestamp" not-null="true" type="DateTime" />
<property name="CreationTimestamp" not-null="true" type="DateTime" />
<property name="Name" not-null="true" type="String" />
</class>
</hibernate-mapping>[/quote]
|