Updating data without extracting

Can NHibernate update some (not all) fields in a table row without receiving any data? I know the identifier of the object.

+4
source share
3 answers
+5
source
session.CreateQuery("update Foo f set f.Date = :date where f.Id = :id") .SetParameter("date", DateTime.Now) .SetParameter("id", 25) .ExecuteUpdate(); 
+4
source

You can do it with HQL

0
source

All Articles