Session attached to a model is saving the changes even if I don't
issue SaveOrUpdate method. Here's what I have, in VehicleForm (model,
Vehicle) button ok:
void ButtonOkClick(object sender, EventArgs e)
{
Vehicle.Name = textBoxName.Text;
Vehicle.Description = richTextBoxDescription.Text;
Vehicle.Inactive = checkBoxInactive.Checked;
Vehicle.Updator = UserSingleton.Instance;
Vehicle.UpdateDate = DateTime.Now;
. . .
But when I change the value of any properties, without calling the
SaveOrUpdate it changes the database values. By the way, Vehicle is
inheriting BaseModel and has like
public virtual void SaveOrUpdate()
{
ISession session = NHibernateHelper.OpenSession();
session.SaveOrUpdate(this);
session.Flush();
}
Thanks for any help in advance.
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.