Reputation: 754
I want to update date Field when any row updated. Means whenever I update perticular field the date need to be changed automatically.
How can I got this in grails Domain class??
Upvotes: 1
Views: 878
Reputation: 1970
Grails can do that for you!
Go to http://grails.org/doc/latest/guide/GORM.html and search for 'Automatic timestamping'
There are 2 fields supported:
"By defining a lastUpdated
and dateCreated
property these will be automatically updated for you by GORM."
Upvotes: 4