2010-11-30 128 views
1

我有帐户类 - 帐户表映射已经。Java Hibernate如何使用select ... where id in()

现在我需要在那里ACCOUNT_ID在使用

从帐户(从anothertable其中选择ACCOUNT_ID ...)

我得到了一个错误说

org.hibernate.hql .ast.QuerySyntaxException:帐户未映射[来自帐户where account_id in(select account_id from anothertable where ...)]

有什么建议吗?

回答

1

我应该使用CLASS NAME而不是表名称。无论如何,谢谢你的时间。

相关问题