I have an object that is saved using Nhibernate. This object use a composite key and is declared like this :
CompositeId()
.KeyProperty(x => x.CreditorName)
.KeyProperty(x => x.CreditorIBAN)
.KeyReference(x => x.Config, "ProfileName");
Map(x => x.ID, "ID").ReadOnly();
Map(x => x.CreationDate, "CreationDate").Default(null);
Map(x => x.ContractReference, "ContractReference");
Map(x => x.CreditorBIC, "CreditorBIC");
References<C_ContractType>(x => x.ContractType, "ContractType_ID");
References<C_Country>(x => x.CreditorCountry, "CreditorCountry");
Table("Creditor");
Cache.ReadWrite();
We can save on without any problem but when we try to update a field (no matter which one) with Session.SaveOrUpdate(entity);
nothing is done (no update) with no error message.
Did we missed something ? Thanks for your help !
-- EDIT --
I add Session.Flush()
after the update method and it's a little better as I can update any value except the ones that are in the key (CreditorName and CreditorIBAN). Any idea ?