-->
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.  [ 2 posts ] 
Author Message
 Post subject: Understand session caching
PostPosted: Fri Feb 04, 2005 1:16 pm 
Beginner
Beginner

Joined: Sun Nov 07, 2004 4:19 pm
Posts: 38
[b]Hibernate version:[/b]
2.1.7

I'm trying to understand on how hibernate caches objects within a given session. If I use the criteria object with different eager fetch then there is a db hit to the database each time. e.g

select * from
Event event
left outer join fetch event.user
where
event.id = 2"

select * from
Event event
where
event.id = 2"

will result in two different sql statements being executed. I would have expected the second query to be not executed. Is this expected?

Dino


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 04, 2005 2:46 pm 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
this is expected, what you need is query cache

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


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

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.