This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
The way that you wrote the query it seems to be an SQL query and not an HQL query. Using session.createQuery, you need to provide to this method a HQL query, and not a SQL query. You can use session.createSQLQuery with a SQL query, or write your query as a HQL query, something like:
select cv.field from table1 alias1 JOIN alias1.x alias2, where x is your association element in the first class.
Hope this helps! [ November 16, 2005: Message edited by: Lucian Ochian ]