On 17 Oct (14:44), William R. Lorenz wrote: > equals a particular value. In SQL, I could do this using something like: > > SELECT * FROM session > LEFT JOIN account ON Session.field1 = account.field4 > WHERE account.field3 = 'value' > > However, I can't seem to get Hibernate to perform this kind of > functionality. This is what I'm using as a Hibernate Query right now: > > String query = > "FROM session IN CLASS org.express.test.Session " + > "WHERE field1 = '" + field1 + "' ";
Thats correct. HQL joins on an implicit join condition (the association mapping) and not on an explicit join condition. For an inner join, you can of course use theta style, like you did. -- Christian Bauer [EMAIL PROTECTED] ------------------------------------------------------- This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo The Event For Linux Datacenter Solutions & Strategies in The Enterprise Linux in the Boardroom; in the Front Office; & in the Server Room http://www.enterpriselinuxforum.com _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel