I have a core patch (https://www.drupal.org/node/2342699) which ensures that SQL updates do not include the primary key in the field list. I need to write a unit test for this issue and EntityApiTest.php looks like the ideal place for this. This test class has a section
$entities = array_values($storage->loadByProperties(['name' => 'test'])); $entities->name->value = 'test3'; $entities->save();
The way I see it, I will need to examine the entity schema to find the database column name of the 'id' entity key, and then examine the SQL update object to ensure that the entity key is not in the field list. Any advice on how to do either of these steps?