These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: How to prevent clear 2nd level cache on ExecuteUpdate()
PostPosted: Thu Nov 13, 2008 7:10 pm 
Newbie

Joined: Mon Jun 23, 2008 6:38 pm
Posts: 13
My application needs to execute a non query sql statement, but NHibernate tries to clean my cache whenever I execute a nonquery like this
currentSession.CreateSQLQuery("SET NAMES 'utf8'").ExecuteUpdate();
. I found the following in the source code in NativeSQLQueryPlan.cs Anyone knows why NHibernate is clearing the cache? and how can I avoid that? Thanks.

Code:
public int PerformExecuteUpdate(QueryParameters queryParameters, ISessionImplementor session)
      {
          CoordinateSharedCacheCleanup(session);

         if (queryParameters.Callable)
         {
            throw new ArgumentException("callable not yet supported for native queries");
         }
                       ..........

                       result = session.Batcher.ExecuteNonQuery(ps);
                       
                       ......................
                }


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.