Hi. I implemented a partial update using the interceptor method FindDirty. The system works well except for the only relationship table that is persisted every time I flush, indipendent of response of FindDirty. I tried also to returns always an empty array from FindDirty, and still that table is persisted, obviuosly any other change isn't persisted.
The class is: <class name="TaxonomyClass" table="CLASS" lazy="true"> <id name="Code"> <column name="CLASS_CODE"/> <generator class="assigned" /> </id> <property name="Name" /> <property name="Description" /> <many-to-one name="OwnerTaxonomyDomain" column="TAXONOMYDOMAIN" class="Taxonomy" cascade="none"/> <many-to-one name="ClassParent" column="PARENT" class="TaxonomyClass" cascade="none"/> <bag name ="ListSampleDoc" cascade="all" lazy="true" inverse="true" fetch="select"> <key column="CLASS"/> <one-to-many class="SampleDocument"/> </bag> <bag name ="ListOwnerTaxonomyClassifiers" table="CLASSIFIERCLASSES" cascade="none" lazy="true" > <key column="CLASS"/> <many-to-many class="Taxonomy" column="TAXONOMYCLASSIFIER" not-found="ignore"/> </bag> <!--<bag name ="ListChild" cascade="all-delete-orphan" lazy="false"> <key column="PARENT"/> <one-to-many class="TaxonomyClass"/> </bag>--> </class>
In bold the definition of relationship table. FindDirty is: public override int[] FindDirty(object entity, object id, object[] currentState, object[] previousState, string[] propertyNames, IType[] types) { int[] iRet = null; /*if (SessionManager.EntityToSave == null || entity == SessionManager.EntityToSave || (bool)ArianeReflection.Invoke(entity, "IsInWeb", new object[]{SessionManager.EntityToSave})) iRet = base.FindDirty(entity, id, currentState, previousState, propertyNames, types); else*/ iRet = new int[] { }; return iRet; }
|