Delete fails when using optimistic-lock and bags
------------------------------------------------
Key: NH-768
URL: http://jira.nhibernate.org/browse/NH-768
Project: NHibernate
Type: Bug
Components: Core
Versions: 1.2.0.Beta1
Reporter: Lukas Macedo
Priority: Trivial
It adds an extra AND without any element or value where the bag is.
For example:
<class name="TABLE" table="TABLENAME">
<id name="RowId" type="Guid" column="RowId" optimistic-lock="dirty" dynamic-update="true" dynamic-insert="true">
<generator class="guid" />
</id>
<bag name="LocationQuantitySummaryList" lazy="true" inverse="true" cascade="none">
<key column="R_LOCATION"/>
<one-to-many class="LocationQuantitySummary"/>
</bag>
<property name="UserDefinedCode6" column="UserDefinedCode_6"/>
</class>
If you try to delete this entity, it will end up with the following statement:
DELETE FROM TABLENAME WHERE ROWID = 'XXX' AND AND USERDEFINEDCODE_6 = "TEST"
Thanks,
Lukas
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.nhibernate.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
|