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.
|