I have some problems with deleting object. I am getting the following error:
[Test.Item#ab9a9869-b2c1-4262-8d33-9dd9010abd96][SQL: DELETE FROM InvoerItem WHERE DbId = ? AND Version = ?]
The DELETE statement conflicted with the REFERENCE constraint "FK9100B9F130A0A610". The conflict occurred in database "", table "dbo.InvoerItemToInvoerItem", column 'Listener_id'.
The situation is like this i have an object that has a collection of references to other objects of the same kind these are called listerners.
The mapping for the object looks like this :
public InvoerItemMap()
{
HasManyToMany(x => x.Listeners)
.ChildKeyColumn("Listener_id")
.Cascade.None()
.Access.CamelCaseField(Prefix.Underscore);
}
What is it that causes the exception when deleting an object that has a listeners connected to it? Do I have to inverse the relation ship of the listeners?