select parent from Post; - selects all of the data as a Parent object, without needing to specifiy what that entails.
It allows formation of objects on the fly through the query language as well:
select new Foo(a, b, c) from Bar; - creates a new Foo object as a subset of a Bar object.
Queries without joins:
from Post as post where post.parent.subject like '%response%';
from Post as post where post.forum.board.owner = ?;
Note that, with caching, some of the above can be resolved entirely in memory without a trip to the database.
Test sizes of collections:
from Forum as forum where forum.posts[0].responses.size > 42; - find all forums where the first post in the forums has more than 42 responses.
Here's a good one from the Hibernate docs:
select cust\nfrom Product prod,\n Store store\n inner join store.customers cust\nwhere prod.name = 'widget'\n and store.location.name in ( 'Melbourne', 'Sydney' )\n and prod = all elements(cust.currentOrder.lineItems)\n\nvs.\n\nSELECT cust.name, cust.address, cust.phone, cust.id, cust.current_order\nFROM customers cust,\n stores store,\n locations loc,\n store_customers sc,\n product prod\nWHERE prod.name = 'widget'\n AND store.loc_id = loc.id\n AND loc.name IN ( 'Melbourne', 'Sydney' )\n AND sc.store_id = store.id\n AND sc.cust_id = cust.id\n AND prod.id = ALL(\n SELECT item.prod_id\n FROM line_items item, orders o\n WHERE item.order_id = o.id\n AND cust.current_order = o.id\n )\n