Update 'date' field on datasource modification

Hello,

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 -> {
        //getDsContext().commit();
        datasourceDs.commit();
        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:

 datasourceDs.getItem().setUpdated(timeSource.currentTimestamp());

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?

Thanks.

Regards,
Sanchit

Temporary Solution:

annotationsDs.addItemPropertyChangeListener(event ->{

        if("lineNum".equals(event.getProperty())){
            // do nothing
        }else{

            annotationsDs.getItem().setUpdated(timeSource.currentTimestamp());
            showNotification("modified");

            /*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…