开发者

Problem with Hibernate join query

开发者 https://www.devze.com 2023-01-10 18:32 出处:网络
I have a problem with writing a join query i开发者_开发知识库n Hibernate although I can write it in sql. It looks like this:

I have a problem with writing a join query i开发者_开发知识库n 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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消