On Tue, Dec 19, 2017 at 7:28 PM, Alexander Zaytsev <haz...@gmail.com> wrote: > Hi, > > There is a "Delete" method on ISession which can accept query. But > unfortunately, it is slow because it is actually equivalent to > > foreach(var o in s.Delete("from Entity e")) s.Delete(o); > > Eg. it first loads all objects into the memory and then deletes them > one-by-one.
Lazy load collections/properties? > We could, potentially, delegate the implementation to just > CreateQuery("delete from Entity e").ExecuteUpdate(); > > The difference between this approach that the second one does not trigger > cascade deletes. I'm not sure what else you mean by "deleting them one by one". You mean you have a collection of children also being deleted? > What do you think? > > Best Regards, > Alexander > > -- > > --- > You received this message because you are subscribed to the Google Groups > "nhibernate-development" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to nhibernate-development+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- --- You received this message because you are subscribed to the Google Groups "nhibernate-development" group. To unsubscribe from this group and stop receiving emails from it, send an email to nhibernate-development+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.