I'm having a problem, and just in some classes, most of then work, and I can't find why other don't. A can create new objects and save without any problem, but in this particular case I can't save a change
I have a parent abstract class:
[DataContract]
public abstract class BaseClass<T> where T : Object
{
public BaseClass(){}
[DataMember]
public virtual int Id{ get; set; }
[DataMember]
public virtual string Code { get; set; }
}
And my class, with problems:
public class NewClass: BaseClass<OtherClass>
{
public NewClass(){}
}
If I create an NewClass object and save it works fine:
var newClass = new NewClass{Code="1"};
Session.SaveOrUpdate(newClass);
Now if I change the Code property value and save, no update is executed in the database.
var newClass = Session.Load<NewClass>(id);
newClass.Code = '01';
Session.SaveOrUpdate(newClass);
EDIT: If I put a transaction, and commit the change, it still do not work.