tags:

views:

32

answers:

1

Hi, I have a problem with writing a join query in Hibernate although I can write it in sql. It looks like this:

Select * from z, y, t where z.id = y.id and t.id = z.id and z.id = 2

What would be the hibernate equivalent? I went through the documentation but the examples there were not very helpful in my situation or I was getting strange results. Thanks for any help.

A: 

You can use SQLQuery to use the same query.User SqlQuery Class which implements Query Class.You can user createQuery method.

Sarath