-->
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.  [ 1 post ] 
Author Message
 Post subject: Doubt about quering objects.
PostPosted: Tue Apr 12, 2005 4:47 pm 
Newbie

Joined: Thu May 20, 2004 5:40 pm
Posts: 10
Location: Rio de Janeiro - Brazil
Hibernate version:
2.1.8

Name and version of the database you are using:
Oracle 8

Hello,
i'm new to Hibernate, and i have one doubt about quering objects. The
best way to describe it is following an example.

For instance, i have a Product, and a Product belongs to a
ProductFamily
, and is of a ProductType.
What i want to do is to list all the Products in a specified ProductFamily
list
, and from a specified ProductType list.

What would be the best way to achieve this? I know that it's easy to
implement it using SQL, HQL, but i wanna implement it using the best
approach Hibernate can provide me, such as the using of Criteria, and
QBE, API's that makes things simple. I don't know if it's possible to use
QBE in this case, because a Product only belongs to one ProductFamily,
and is of one ProductType, and the function brings the Products from a list
of ProductFamily (using feature like Expression.in(...)), and of a list of
ProductType (using feature like Expression.in(...))
. Is it possible to do this
using QBE?

I'm waiting for an answer anxiously! :)
Regards...
Alexandre Martins.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.