Hello,
I've a problem when I want to delete a row from an ISet.
I removed the row by calling
Code:
originalSet.Remove(item);
But when I call the save-method only UPDATES are made in the database
Code:
public virtual void Save(dc_tblTest obj)
{
using (ISession session = factory.OpenSession())
{
ITransaction tx = session.BeginTransaction();
session.SaveOrUpdate(obj);
tx.Commit();
}
}
Shouldn't NHibernate know that I removed one item from the ISet and automatically delete that row from the database?
In the mapping-file I've specified cascade="all"
Code:
<set
name="list_tblAdresse"
inverse="true"
cascade="all">
<key column="ID_Test"/>
<one-to-many class="BusinessLayer.Interface.dc_tblAdresse, BusinessLayer.Interface"/>
</set>