I have a property named Last updated time in my entity.java file. I'm not showing this field in any of my xhtml files, but i want this value to be updated in the corresponding entity table of the database whenever a user adds an entity or updates an entity.
To do this i have written the code which looks like this.
When i add a new entity the current time value will be added to the database, but when i update the existing entity the value is not getting updated.It retains its old value. What should i do inorder to do this? please help.