It's not a secret anymore!
The moose likes Object Relational Mapping and the fly likes Inner Joins using HQL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Inner Joins using HQL" Watch "Inner Joins using HQL" New topic

Inner Joins using HQL

Devendra Bhati

Joined: Dec 27, 2012
Posts: 19
I am unable to get where i'm missing. This below query execute well in SQL but not in HQL.
ERROR: org.hibernate.hql.ast.QuerySyntaxError: unexpected token: ON near line 1, column 148 [SELECT op.username,, orders.p_id, orders.o_id, product.listed_price FROM com.model.Orders orders INNER JOIN orders.OrderProcessing as op ON op.u_id = orders.u_id INNER JOIN orders.Product as product ON product.p_id = orders.p_id WHERE product.p_id = '208' ORDER BY op.username]

I agree. Here's the link:
subject: Inner Joins using HQL
It's not a secret anymore!