Problem/Motivation

The code does the opposite of what it says it does

salesforce/modules/salesforce_mapping/src/Entity/MappedObject.php

// If $value is TypedData, it should have been set during pullValue().
if (!$value instanceof TypedDataInterface) {
  $drupal_field = $field->get('drupal_field_value');
  $drupal_entity->set($drupal_field, $value);
}

Proposed resolution

Remove negative validation.

Issue fork salesforce-3443380

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

keopx created an issue. See original summary.

keopx changed the visibility of the branch 5.0.x to hidden.

keopx’s picture

Status: Active » Needs review

I removed the negative validation

aaronbauman’s picture

Status: Needs review » Needs work

The comment is perhaps unclear.
A clearer comment might be:

// If $value is TypedData, it should have been set during pullValue(), so we don't need to set it again here.

facine made their first commit to this issue’s fork.

facine’s picture

Status: Needs work » Needs review
aaronbauman’s picture

Version: 5.0.4 » 5.1.x-dev
Status: Needs review » Needs work

I don't think the behavior needs to change, only the comment.