-->
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: Help with complex query (members of a collection)
PostPosted: Fri Dec 28, 2007 5:24 pm 
Newbie

Joined: Tue Mar 08, 2005 12:24 pm
Posts: 9
Location: Boston
We have an object model where we have a collection of categorized items and need to query using multiple conditions about these items.

E.g. Retrieve all Orders where there is an item of category "shoes" with name = "nike" AND an item of category "missiles" with name = "nike".

We're not really selling shoes or missiles, but that's the basic idea.

We have a graphical query builder that sets up Criterion objects (with aliases) to do these queries, but we are having problems with AND queries and with NOT queries (we think they are skippping NULLs) in these category-based situations.

My questions are: 1) Should we use HQL or somehow leverage SQL rather than use criteria for these complex queries?

2) Are there any tools or existing guis that can help us make a good graphical query builder on top of hibernate?

many thanks....


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 29, 2007 11:16 am 
Newbie

Joined: Sat Dec 15, 2007 3:34 am
Posts: 3
For complex queries like these, from experience i would suggest using HQL.
As for GUIs, sorry but the closest you can get is using the hibernate plugin for eclipse, where you can incrementally build your query and test each condition.

_________________
~bellerophon


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.