One tip: to successfully use H you should try thinking in terms of objects and properties, and not in the terms of records and columns.
Now, lets assume that Order object has property of Customer type and the property is mapped in H mapping files, then the HQL will be
From Order o where o.something = :someparam
Then you probably want just a list of property values and do not want to instantiate all those stinking objects :)
Then HQL will look like:
Select o.property, o.customer.property from Order o where o.something = :someparam
Such query returns list of arrays to iterate through.
http://www.hibernate.org/hib_docs/v3/re ... ing-scalar
and of course you can escape into SQL
http://www.hibernate.org/hib_docs/v3/re ... rysql.html