So I have a HQL Query like so:
String query = "from records where lastUpdateTime >=:startDate " +
"AND lastUpdateTime < :endDate";
I need to change it so that I only retreive the latest version of a record between the two dates.
So I have:
ID | VERSION | other records | LASTUPDATETIME
I need to use a max on the VERSION but my knowledge of HQL is letting me down.
You might need something like that: