Reputation: 1471
I can use HQL to do bulk operations but these operations do not update the first level cache of NHibernate, so I'm facing various problems because I do not want to clear the session or refresh objects.
Is there any way of performing bulk updates / deletes without using HQL or native SQL with affecting the in-memory state of NHibernate cache?
Upvotes: 0
Views: 61
Reputation: 1471
So, it seems that the only way is to handle it manually and refresh the object:
session.Refresh(entity);
Upvotes: 1