Monday, August 20, 2012

NHibernate:Could not execute native bulk manipulation query...

While working on one of the project for fine tuning the NHibernate queries and functional flow I got to know about the error "could not execute native bulk manipulation query:"

To avoid this error one has to remember the following things:
  1. While executing tasks which requires bulk manipulation of data like update, delete, it is suggested to use the HQL instead of SQL.
  2. While using HQL be cautious to use the createQuery of NHibernate session.
  3. Do not forget to use the ExecuteUpdate();
Hope this will save your precious time for coding :)