I have a problem with languages and no stubbing regarding migration_lookup plugin in Drupal 8.
I have a different json data, each of them is different languages for example
json with de:
data:{ id: 12345, name: 'Product 1 de', id: 123456, name: 'Product 2 de'}
json with en
data:{ id: 12345, name: 'Product 1 en'}
of course this json is only example not validate.
I have a 2 migration yaml file called: migrate_plus.migration.data.yml and migrate_plus.migration.data_de.yml
English version is default version in drupal.
To join de version with en I use process:
nid:
-
plugin: migration_lookup
source: id
migration: data
no_stub: true
stub_id: data
I use no_stub: true because i don't want to create stub nodes for not existing en version. Everything works well but only for first time but if I want to update migration I got errors
[error] Drupal\Core\Database\IntegrityConstraintViolationException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '9424706c-e536-4a59-be13-ebb91367a1a9' for key 'node_field__uuid__value': INSERT INTO {node} (vid, type, uuid, langcode) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3); Array
for de version item. In my case I don't want to create new stub item for english version for product 2 de so I though that no_stub option will be ok. Even if I do migrate:rollback I noticed that this migration from de still exist.