At the top of MigrateDestinationEntityAPI::import(), there's a check on whether the entity was previously migrated. If not, the entity ID is unset.
public function import(stdClass $entity, stdClass $row) {
$migration = Migration::currentMigration();
// Updating previously-migrated content?
if (isset($row->migrate_map_destid1)) {
if (isset($entity->{$this->id})) {
if ($entity->{$this->id} != $row->migrate_map_destid1) {
throw new MigrateException(t("Incoming id !id and map destination id !destid1 don't match",
array('!id' => $entity->{$this->id}, '!destid1' => $row->migrate_map_destid1)));
}
}
else {
$entity->{$this->id} = $row->migrate_map_destid1;
}
}
else {
unset($entity->{$this->id});
}
This is a problem if our system of record is Migration::DESTINATION, which throws a "no destination id provided" error.
Looking through the git history, it looks like this was introduced in #1530848: Entity API plugin: various cleanups and improvements.
Comments
Comment #1
les limPatch attached.
Comment #2
mikeryanCommitted, thanks.