【问题标题】:Hibernate Criteria API for filtering a table rows by min value of its columnHibernate Criteria API,用于按列的最小值过滤表行
【发布时间】:2011-12-10 08:00:15
【问题描述】:

我们如何使用 Hibernate 标准 api 实现以下查询

select * from User where date = select min(date) from User

User 有一个名为 date 的列

【问题讨论】:

标签: hibernate


【解决方案1】:

你有 Projections 类,它可以帮助所有聚合/分组的东西。 http://www.163jsp.com/help/hibernate32api/org/hibernate/criterion/Projections.html

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-08-31
    • 1970-01-01
    • 2016-12-26
    • 2014-12-01
    • 2017-10-13
    • 1970-01-01
    • 2010-11-18
    相关资源
    最近更新 更多