-->
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.  [ 3 posts ] 
Author Message
 Post subject: what does hibernate read from the cache?
PostPosted: Fri Sep 15, 2006 3:02 pm 
Beginner
Beginner

Joined: Fri Sep 01, 2006 3:35 pm
Posts: 21
i tried to find answer via google, but i failed. my questions are:

when i load objects like this:
"from a left join fetch whatever left join fetch subobject where whatfield = whatevervalue"

what exactly does hibernate try to load from the cache, and what does it not?

let's say i have some a's cached, and some not. are all read from the database (replacing the cached ones), or does hibernate check on the uid-column first to determine which ones it actually has to create by new a()?
when i do a join, does hibernate automatically fill the cached whatevers in the loaded a's, or will i end up with new instances of subobjects after every statement?
if i run the same statement again (in another session), will i get the same instances of a, or new ones?

if i use a statement to get specific a's, like "from a where uid = 25 or uid = 40", what will happen? is hibernate smart enough to look into the cache for the objects, or will it use a sql query? what about other conditions like "where uid between(y, x)" or "where anyotherfield = xy"?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 16, 2006 1:27 pm 
Beginner
Beginner

Joined: Fri Sep 01, 2006 3:35 pm
Posts: 21
don't tell me you're all using a cache and have no idea what it's doing?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 17, 2006 10:50 pm 
Beginner
Beginner

Joined: Thu Jun 15, 2006 5:31 am
Posts: 21
ha Hamster, thats funny - you would be suprised at how much we can get done without knowing what we are doing.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.