Problem/Motivation
If the Entity used by an EntityResource implements `EntityChangedInterface` this is not updated when a patch method is used to update the entity via the rest API.
Steps to reproduce
Create an entity that implements EntityChangedInterface and a subclass of EntityResource which uses this Entity. Update the entity via the rest API, the updated timestamp is not modified.
Proposed resolution
This is a fairly simple enhancment
Before the entity is saved in the Patch method
if ($original_entity instanceof EntityChangedInterface) {
$original_entity->setChangedTime(time());
}
This is a core interface so it would be nice to see it supported.
Remaining tasks
User interface changes
None
API changes
None
Data model changes
None