Hibernate 标准 api“选择”
是否可以使用 hibernate Critiria api 创建“select in”查询?
例子 : 我有两个 1:n 关系的表,公司和部门
select * from company c where c.id in (select company_id from department d
where d.departmentname = 'HR' and d.location = 'xyz')
is it possible to create a 'select in'-query with the hibernate critiria api ?
Example :
I have two tables in a 1:n relation, company and department
select * from company c where c.id in (select company_id from department d
where d.departmentname = 'HR' and d.location = 'xyz')
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以用于此 DetachedCriteria
You can use for this DetachedCriteria