Problem/Motivation

The existing implementation of the entity reference processor was built specifically to target population of entity reference fields. As a result, the final return value replaced into the content for import is in the format of:

  - target_id: <entity id>

Having seen more usage, this feature has proven less useful since entity matching has been more flexible and easier to manage. Building on this feature that has replaced it, changing this processor to load the entity itself instead will restore value to this feature and again offer a flexible solution to query and load existing content within content files.

Proposed resolution

Update the entity reference processor to return the queried entity itself instead of the formatted target_id: value that has limited its usefulness. With the entity object loaded the Field API may then take over during the save process to format the saved value as needed by the specific field plugin in question.

Comments

slucero created an issue. See original summary.

slucero’s picture

New implementation for this should utilize the updated logic being introduced in #2949625: Move Entity Loading and Lookup into Helper Service.