C开发者_开发百科an NHibernate update some (not all) fields in the table row without retrieving any data? I know Id of the entity.
You can find all the examples here:
http://nhibernate.info/doc/nh/en/index.html#batch-direct
session.CreateQuery("update Foo f set f.Date = :date where f.Id = :id")
.SetParameter("date", DateTime.Now)
.SetParameter("id", 25)
.ExecuteUpdate();
You can do it with HQL
精彩评论