-->
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: JPA query hints -> readOnly
PostPosted: Fri Jun 08, 2007 9:19 am 
Beginner
Beginner

Joined: Fri Apr 20, 2007 1:07 am
Posts: 23
Hi All,

I am using version 3.2.1 ga core and annotations. I have got a simple query which retrieves a list from an entity called MutualFund

"select mfinstrument from MutualFundInstrument mfinstrument"

Created this in a query object and executed...not a problem. I want to use hints out here and added the following hint to the same

Query query = entityManager.createQuery("select mfinstrument from MutualFundInstrument mfinstrument").setHint("org.hibernate.readOnly",true);


Unfortunately the time taken to execute seems a bit longer..close to 100 ms.....Am I missing any configuration ? Log debug showed me this line

DEBUG - JDBCTransaction.commit(103) | commit
DEBUG - AbstractFlushingEventListener.prepareEntityFlushes(111) | processing flush-time cascades
DEBUG - AbstractFlushingEventListener.prepareCollectionFlushes(154) | dirty checking collections

It happened after the commit ? Please do give me some insights as I do not seem to be doing anything wrong.

just FYI...this is a polymorphic query but its just an inner join inside..I guess this shudnt affect the same...

Thanks....VJ


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.