Can I execute HQL queries?
"get a UserEntity where the creationTimestamp property is the last of all UserEntities."
Essentially a request to return the “newest user” to our program, where each UserEntity has a field mapped to a timestamp column in our database.
HQL query for a list of users from the newest:
from UserEntities order by creationTimestamp desc
Use to restrict the result set to only one user. setMaxResults
setMaxResults
The query for the highest value of creationTimestamp will look like this:
from UserEntity where creationTimestamp = max(creationTimestamp)
( ) , query.uniqueResult().
query.uniqueResult()
. 14. HQL: .
HQL order-by?
HQL order-by
Source: https://habr.com/ru/post/1751664/More articles:SQL syntax error with Derby and Circumflex ORM - scalaГде распространяемые модули слияния для выпуска Visual Studio С++ Express? - visual-c++what a good orm api will work well with scala or erlang - scalaSiteMap Navigation and Query String - c #Entity Framework: getting objects not directly related - frameworksAdd UINavigationController to iPhone Preview - objective-cRegistering with a URL for asynchronous notifications? - javaUINavigationController Does Not Show Root View Controller - iphoneImprove the camel string method - c #How to close a JFrame-based window with a JButton click event - javaAll Articles