I've a problem to understand a feature of Nhibernate I've read the documentation, look at a couple of sample but never find what I wanted to realize.
I have a many to many association between two tables "Order" and "Product" which is a table "OrderLine" with just the two foreign keys.
I want the following behaviour:
If I delete an object "Order", it's always succed and delete also all OrderLines item linked to this Order. But it wil never delete a Product.
If I delete an object "Product", it can fail if some orderlines use this product.
Sorry but I think I don't understand really well the "inverse" and cascade attributes in the mapping :-(
Thx for your help.
|