Update with DetachedCriteria

2009-10-21 Thread Bruno Leitão de Oliveira
I have a entity Project like this: class Project { long id { get; set; } long id_parent { get; set; } long name { get; set; } } how can I update the name of all Projects where id_parent = 1 with DetachedCriteria Ps.: with only 1 sql example: update tb_project set name='hello' where

Re: Update with DetachedCriteria

2009-10-21 Thread Markus Zywitza
With criteria, you can only fetch entities, not update them in a batch. HQL allows that, but you need to access the ISession directly for it. -Markus 2009/10/21 Bruno Leitão de Oliveira uncod...@gmail.com I have a entity Project like this: class Project { long id { get; set; } long

Re: Update with DetachedCriteria

2009-10-21 Thread Bruno Leitão de Oliveira
thanks On Oct 21, 5:55 pm, Markus Zywitza markus.zywi...@gmail.com wrote: With criteria, you can only fetch entities, not update them in a batch. HQL allows that, but you need to access the ISession directly for it. -Markus 2009/10/21 Bruno Leitão de Oliveira uncod...@gmail.com I