berets wrote:
i'm trying to update a master/detail class but i always get this exception :
SQL insert, update or delete failed (expected affected row count: 1, actual affected row count: 0). Possible causes: the row was modified or deleted by another user, or a trigger is reporting misleading row count.
DETAIL
---
<class name='CUP.Details, CUP' table='DETAILS'>
<composite-id>
<key-property name='Year' column='PREANN' />
<key-property name='Number' column='PRENUM' />
<key-property name='DetailRow' column='PRERIG' />
</composite-id>
<property name='ReservationDate' column='PREDAP' />
</class>
In case of composite key, NHibernate is unable to correctly dtermine if object is new instance or changed one. So, add <version> element to class mappings with appropriate unsaved-value attribute.
Gert