0

I have an entity which contains several sets/bags. is there any recommendation from NHibernate on how to delete it? of course I can do foreach on each list and delete each child, but that will create many delete statements. is it better to create HQL for each child table, or maybe other approach? I've also seen on another thread to use IStatelessSession. is it wise here?

1 Answer 1

1

Personally I think HQL works well in this instance.

Or if your stomach can take it use cascading deletion at the database level then delete the parent and the children precede automatically.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.