开发者

Java hibernate how to use select ... where id in ()

开发者 https://www.devze.com 2023-01-27 10:31 出处:网络
I have Account class--account table mapping already. Now I need use from account where account_id in (select account_id from anothertable where...)

I have Account class--account table mapping already.

Now I need use

from account where account_id in (select account_id from anothertable where...)

I got an error saying

org.hibernate.hql.ast.QuerySyntaxException: account is not mapped [from account where account_id in (select account_id from ano开发者_Go百科thertable where...)]

Any suggestions?


I should use CLASS NAME, not TABLE NAME. Thank you for your time anyway.

0

精彩评论

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