Joined: Mon May 04, 2009 1:51 pm Posts: 1
|
I am new at Nhibernate and I have a question that i could not find the answer yet. I have a User class that is saved via Nhinernate to a database. When I update a "user" object everything works ok by using an UpdateUser(User obj) method on my Service class. Now lets say that on that UpdateUser method I don't want the "password" field to be able to be change because I need more compex logic so i prefer to have a ChangePassword(User obj, String NewPassword) method for changing it. How can i control that mapping / update so the password wont generate any update sql code on the UpdateUser method and it will update ok on the ChangePassword method ? On my mind the same problem can occur in many situations .. lets say i need a "LastLogin" date field that will be updated internally on the login method but should not be updated on the UpdateUser method. Any suggestions ?
Thanks in advance
George Statis
|
|