We're using
Hibernate version: 3.1 and writing java code with Eclipse.
Suppose our
application domain has these aspects:
1. Cases contain boxes.
2. Boxes contain items.
3. Sometimes a case or a box is empty.
4. Sometimes a box or item is loose and has no parent container.
We think our database is properly designed. It has three tables: case, box and item. They have these fields
case.id
case.barcode
box.id
box.case_id
box.position_in_case
item.id
item.barcode
item.position_in_box
We
need to display a list that has the following in each row:
case.barcode
box.position_in_case
box.barcode
item.position_in_box
item.barcode
How do we write a query to return a list of objects to populate the list?
We have a large number of objects and plan on using query.setFirstResult() and query.setMaxResults().
Reading chapter 7 of the book Hibernate in Action gives us a few clues, but leaves us wondering how to do multiple outer joins.
Is there a reference document that uses BackusNauer notation to
definitively specify syntax of hql queries?
TIA,
BE