diff -u b/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php b/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php --- b/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php +++ b/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php @@ -111,14 +111,14 @@ protected function updateEntity(EntityInterface $entity, Row $row) { $destination = $row->getDestination(); - // Allow the migration to specify the properties to be overwritten. - if (isset($this->configuration['overwrite'])) { - $overwrite = $this->configuration['overwrite']; + // Allow the migration to specify the properties to be preserved. + if (isset($this->configuration['preserve_properties'])) { + $preserve = $this->configuration['preserve_properties']; } else { - $overwrite = array_keys($destination); + $preserve = array(); } - $destination = array_intersect_key($destination, array_flip($overwrite)); + $destination = array_diff_key($destination, array_flip($preserve)); foreach ($destination as $field_name => $values) { $field = $entity->$field_name; diff -u b/core/modules/migrate_drupal/src/Tests/d6/EntityContentBaseTest.php b/core/modules/migrate_drupal/src/Tests/d6/EntityContentBaseTest.php --- b/core/modules/migrate_drupal/src/Tests/d6/EntityContentBaseTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/EntityContentBaseTest.php @@ -6,6 +6,7 @@ */ namespace Drupal\migrate_drupal\Tests\d6; + use Drupal\migrate\Entity\Migration; use Drupal\user\Entity\User; @@ -42,13 +43,13 @@ } /** - * Tests overwriting selected properties in the destination entity, specified + * Tests preserving selected properties in the destination entity, specified * in the destination configuration. */ - public function testOverwriteSelectedProperties() { + public function testPreserveSelectedProperties() { $migration = Migration::load('d6_user'); $destination = $migration->get('destination'); - $destination['overwrite'][] = 'mail'; + $destination['preserve_properties'][] = 'name'; $migration->set('destination', $destination); $this->executeMigration($migration);