langcode: en
status: true
dependencies:
  enforced:
    module:
      - asset
      - farm_migrate
id: farm_migrate_area_field_parent
label: 'Area parent references'
migration_group: farm_migrate_asset_parent
migration_tags:
  - 'Drupal 7'
  - 'farmOS 1.x'
class: Drupal\migrate\Plugin\Migration
field_plugin_method: null
cck_plugin_method: null
source:
  plugin: d7_farm_area
  area_type: any
destination:
  plugin: 'entity:asset'
process:
  # Look up assets created by type-specific migrations.
  id:
    -
      plugin: farm_migration_group_lookup
      migration_group: farm_migrate_area
      source: tid
      no_stub: true
    # If no asset was found in previous migrations, skip the row.
    -
      plugin: skip_on_empty
      method: row
  parent:
    -
      plugin: skip_on_empty
      method: process
      source: parent
    -
      plugin: farm_migration_group_lookup
      migration_group: farm_migrate_area
      source: parent
      no_stub: true
migration_dependencies:
  required: {  }
  optional: {  }
