2010-11-30 119 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而不是表名稱。無論如何,謝謝你的時間。

相關問題