tags:

views:

41

answers:

1

I have the following SQL which I can't work out how to convert to HQL....

SELECT dbo.Style.Id, dbo.Style.Name
  FROM dbo.Price 
  JOIN dbo.PriceGroup ON dbo.Price.priceGroupId = dbo.PriceGroup.Id 
  JOIN dbo.Product ON dbo.Price.productId = dbo.Product.Id 
  JOIN dbo.Style ON dbo.PriceGroup.Id = dbo.Style.priceGroupId
 WHERE (dbo.Product.Id = 1)

...it would be excellent if someone could tell me the answer, but also point me in the direction of some good HQL documentation/tutorials on the subject of joins. I've searched on google but haven;t been able to find anything comprehensive.

+1  A: 

This is where I got started.

http://docs.jboss.org/hibernate/stable/core/reference/en/html/queryhql.html#queryhql-joins

UmYeah