Hi There.
For example.
Car c = new Car(); c.name = "My Car"; c.color = "Red"; c.maxspeed = "200";
Then you use NHibernate save (persist) to persist your object. After that you want to change (update) part of your object, corret? So, you use NHibernate load, to get you object.
Car c = NHibernate.load(); //Check the rigth method call. This is an example.
And now you want to change one property. c.name = "My new Car";
If you change the NHibernate property
<property name="color" column="COLOR" update="false" />
<property name="maxspeed" column="MAXSPEED" update="false" />
the SQL will be: UPDATE CAR SET NAME = 'My new Car' WHERE ID = ?; You can use this to mapping properties you never want to update because its heavy.
and NOT UPDATE CAR SET NAME = 'My new Car', COLOR = 'Red', MAXSPEED = '200' WHERE ID = ?;
I guess that's what you want? sorry if I got you wrong.
[]s
|