작동하지 않습니다 삭제할 2008 R2NHibernate에 - 캐스케이드 내가 MS SQL Server에 NHibernate에 3.2를 사용
나는 fallowing 매핑
<class name="LocalizedProperty" table="LocalizedProperty">
<cache usage="read-write"/>
<id name="Id" column="Id">
<generator class="guid.comb"/>
</id>
<property name="CultureName" not-null="true"/>
<property name="PropertyName" not-null="true"/>
<property name="PropertyValue" not-null="true"/>
<any id-type="Guid" name="Entity">
<column name="LocalizedEntityClass" not-null="true"/>
<column name="EntityId" not-null="true"/>
</any>
</class>
이 그리고이 하나 LocalizedProperty에 대한 참조가 있습니다
<class name="CommunicationType" table="CommunicationType" lazy="false" >
...
<set name="LocalizedProperties" where="LocalizedEntityClass = 'Prayon.Entities.CommunicationType'" cascade="delete">
<key column="EntityId" foreign-key="none" />
<one-to-many class="LocalizedProperty" />
</set>
</class>
을
문제점 : CommunicationType의 엔티티를 삭제할 때 NHibernate가 LocalizedProperty의 fallowing update-statement를 실행 중입니다.
UPDATE LocalizedProperty SET EntityId = null WHERE EntityId = @p0 AND (LocalizedEntityClass = 'Prayon.Entities.CommunicationType')
Delete-Statement 대신.
누군가가 뭘 잘못 보았습니까?