gpt4 book ai didi

Java hibernate如何使用select...where id in()

转载 作者:太空宇宙 更新时间:2023-11-04 08:46:04 25 4
gpt4 key购买 nike

我已经有了 Account 类——帐户表映射。

现在我需要使用

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

我收到一个错误提示

org.hibernate.hql.ast.QuerySyntaxException:帐户未映射[来自 account_id 所在的帐户(从另一个表中选择 account_id...)]

有什么建议吗?

最佳答案

我应该使用类名,而不是表名。不管怎样,谢谢您的宝贵时间。

关于Java hibernate如何使用select...where id in(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4316638/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com