-->
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: Criteria API Keyword search and collections
PostPosted: Mon Oct 13, 2008 7:35 am 
Newbie

Joined: Mon Oct 13, 2008 5:29 am
Posts: 2
Hello,

i'm experiencing a little problem when searching the following domain with Criteria API:

Book 1--* Authors

When searching Books written by an Author with a specific first name e.g.,
the returned result contains the Books but only the "matching" authors.

How can i make sure, that all Authors are loaded?
Is this about setting the correct fetching strategy?

Thanks!

Cheers


Top
 Profile  
 
 Post subject: Workaround
PostPosted: Thu Oct 16, 2008 3:29 am 
Newbie

Joined: Mon Oct 13, 2008 5:29 am
Posts: 2
Workaround:
- Write a HQL Query to get the "root" object's id's (distinct!)
- Retrieve Objects

Note that when using criteria api, root objects would be in the cache having not all assigned dependencies (because of the search criteria, only matching dependencies are really loaded).


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.