Hello,
i've got a little problem with the latest NHibernate release.
Code:
[Transaction(ReadOnly=false)]
public void DeleteReceiverWithReference(Guid receiverId)
{
IQuery q = Session.GetNamedQuery("GetShipmentReceiversByReceiver");
q.SetGuid("value", receiverId);
IList<ShipmentReceiver> myShipmentReceivers = q.List<ShipmentReceiver>();
foreach (ShipmentReceiver mySReceiver in myShipmentReceivers)
{
mySReceiver.Receiver = null;
mySReceiver.UsedAddress = null;
mySReceiver.TaxNumber = "12345";
Session.Update(mySReceiver);
}
bool t = Session.IsDirty();
}
After Session.update() the Session.IsDirty() returns false.
After the commit the update will not be flushed to the database.
The changes are lost! The Session should be dirty!?
Does anyone have any suggestions about what could be wrong?