Is there a way to get last and recently updated records from the database?
The records don't have any date information and I don't wan't to change the table structure. The ID also can't be used because these are edited records and not newly added.
Is there a way to get last and recently updated records from the database?
The records don't have any date information and I don't wan't to change the table structure. The ID also can't be used because these are edited records and not newly added.
I prefer to add the field lastUpdateted
in Domain classes
then use the method beforeUpdate from GORM, and then query using order by lastUpdated
with limit.
See also "How do you do a limit query in HQL?"
clarify question!!! there are a lot of ways to do it: