For some reason a particular persistent object of mine keeps updating non-dirty properties. I've added an interceptor and I can confirm that those values in previousState and currentState are the definitely the same.
My understanding is that if you use ISession.Load to acquire the instance and the update on the same session, only the changed properties should be updated.
Are there any common reasons for this? Or do I need to post my code and mappings?
My code that does the update:
Code:
using (ISession session = Global.Factory.OpenSession())
using (ITransaction transaction = session.BeginTransaction())
{
Invoice invoice = (Invoice) session.Load(typeof (Invoice), invoiceID);
invoice.InvoiceNum = InvoiceNumber;
session.Update(invoice);
session.Flush();
transaction.Commit();
}