开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜