Hibernate Books

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: Querying: "global fetching strategy" and "glo
PostPosted: Fri May 23, 2008 8:29 am 
Pro
Pro

Joined: Tue Jun 12, 2007 4:13 am
Posts: 209
Location: Berlin, Germany
In the book you can read this at page 651:

"HQL and JPA QL ignore any fetching strategy you've defined in metadata. (...) A dynamic fetching strategy igores the global fetching strategy (on the other hand, the global fetch plan isn't ignored - every nonlazy association or collection is guaranteed to be loaded."[/i]

What does this exactly mean? In my experience, the last sentence is what you get on queries if you have EAGER loaded associations. But the first sentence just says the opposite. And: What is the difference between "global fetching strategy" and the "global fetch plan"?

The background of this question is discussed at: http://forum.hibernate.org/viewtopic.php?p=2386043#2386043.

The question comes down to:

- if I do have EAGER mapped associations, are there any means to ignore these in a JPA query or with the Criteria API and do LAZY loading?

- if not: is there a chance that future versions of Hibernate / JPA will support this?

In the context where I'm working it is a very useful feature to have some associations loaded EAGERly. But on the other hand, as I said, this "global fetch plan" is not useful if you have specialized queries where you do not need and do not want the objects of the associations. So I resorted to native SQL (what I see as the last chance).

I know, the opposite feature (LAZY mappings, EAGER fetchings) is supported (because LAZY is Hibernate's default?)

Christian, could you please ask these questions?

Thanks, Carlo


Top
 Profile  
 
 Post subject: Re: Querying: "global fetching strategy"...
PostPosted: Wed May 28, 2008 2:22 am 
Pro
Pro

Joined: Tue Jun 12, 2007 4:13 am
Posts: 209
Location: Berlin, Germany
carlolf wrote:
Christian, could you please ask these questions?

Sorry, I really meant "could you please respond to these questions?".

Or is there anybody else here who is able to inprete the cited passages of the book?

Carlo


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.