Suppose I have the following mapping:
<hibernate-mapping package="mypackage">
<class name="User" table="user">
<id name="id" column="id">
<generator class="native"></generator>
</id>
<property name="name" />
<property name="age" />
</class>
</hibernate-mapping>
Can I select the oldest user (maximum age) using the criteria in sleep mode?
I can imagine that I could do this with two options. (first select the total number of users, and then order the entries by age and select the first entry). But is this possible with one choice?
thank
Fell
source
share