What is wrong with this approach for updating a field value in a specific revision:
public function myTest() {
$test = 'mytest33';
$node_revision = \Drupal::entityTypeManager()
->getStorage('node')
->loadRevision(10364);
$node_revision->set('field_my_field', $test);
$node_revision->save();
return [
'#markup' => 'Test page.',
];
}
When I load this simple test page and look at revision 10364 for the node, field_my_field doesn't update.