Update 'date' field on datasource modification


I’m trying to update the date field in dataGrid when a user try to modify the datasource.
First of all, I have a question why modifying datasource doesn’t update it’s last updated timestamp ?

So, far I’ve used editor postCommitListener to commit changes to the datasource like this:

        dataGrid.addEditorPostCommitListener(event -> {
        showNotification("Changes saved");

and also itemChangeProperty listener like this:

         datasourceDs.addItemPropertyChangeListener(event ->{
                log.info("Property {} of {} has been changed from {} to {}",
                event.getProperty(), event.getItem(), event.getPrevValue(), event.getValue());


Well, technically I only need to add this line to update the field on property change:


But the problem is I have also added a non-persistent attribute to my entity to add the serial numbers in the grid.
Now, in the logs for the property change there are thousands of line stating the serial number is changed from null to row number. I know it is an generated attribute which will always differ but this is bad in my case because if I try to update the field than it will update the changes to everything.

Q Is there a way to exclude a specific property change?
Q How to update the date field automatically on datasource modification?



Temporary Solution:

annotationsDs.addItemPropertyChangeListener(event ->{

            // do nothing


            /*log.info("Property {} of {} has been changed from {} to {}",
                    event.getProperty(), event.getItem(), event.getPrevValue(), event.getValue());*/


but still looking for an answer to update the field instantly…