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"?
|