I guess you have to think of Java-type expressions in a SQL-style statement.
On Nov 18, 2008, at 12:22 PM, Landers, Richard wrote:
I think you just need to compare SalesOrder with SalesOrder (not SalesOrder with SalesOrder.id). That is, the expression "lic.salesOrder=o.id" would have to read "lic.salesOrder=o" because in EJB QL the expression "lic.salesOrder" refers to an object, not a column as in SQL. Also, you could let EJB QL do the join implicitly... SELECT lic.productId, COUNT(lic) FROM License lic WHERE lic.salesOrder.countryCode LIKE :countryCode GROUP BY lic.productId -- Rich Landers
smime.p7s
Description: S/MIME cryptographic signature