Alibabra
The following EJB QL query selects the names of all products that have been ordered. It illustrates the selection of values other than entity beans, therefore it can be used only for SELECT methods, not for FINDER methods: SELECT DISTINCT l.product.name FROM Order o, IN(o.lineItems) l