#
swilliam
Dear All
I'm getting some strange errors when deleting an item from a one to many relation. I have a basket and can quite happily add or update basket items to the basket's basket items ArrayList. I'm deleting items by removing them from the ArrayList then calling CommonDao.Save(basket).
The full message is:
Interestingly, this code works without errors when called via an NUnit test but not when used on the web so perhaps this is session related. The mapping for the Basket class is this:
I'm new to NHibernate so I'm not really sure what I'm doing. Does anyone have any ideas?
Many thanks
Simon
I'm getting some strange errors when deleting an item from a one to many relation. I have a basket and can quite happily add or update basket items to the basket's basket items ArrayList. I'm deleting items by removing them from the ArrayList then calling CommonDao.Save(basket).
The full message is:
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.Interestingly, this code works without errors when called via an NUnit test but not when used on the web so perhaps this is session related. The mapping for the Basket class is this:
bag name="BasketItemList" inverse="true" lazy="true" cascade="all-delete-orphan"I'm new to NHibernate so I'm not really sure what I'm doing. Does anyone have any ideas?
Many thanks
Simon