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??
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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
lastUpdatedanddateCreatedproperty these will be automatically updated for you by GORM.”