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.
精彩评论