Follow-up to #1906806: Provide a relationship for each entity reference field.

Problem/Motivation

While working on #2321721: Provide a views relationship for each dynamic entity reference field @larowlan pointed this issue to me.
Drupal\entity_reference\Tests\Views\EntityReferenceRelationshipTest

    $entity = $entity_storage->create(array('field_test' => $entity->id()));
    $entity->field_test->target_id = $referenced_entity->id();
    $entity->save();

So field_test value is overwritten by 2nd line.

Proposed resolution

See the attached patch

Remaining tasks

Review

User interface changes

None

API changes

None

CommentFileSizeAuthor
vdc-minor-bug-fail.patch1014 bytesjibran
vdc-minor-bug.patch1.04 KBjibran
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jibran’s picture

Title: Provide a relationship for each entity reference field. » Minor issue in EntityReferenceRelationshipTest

Fail patch will also pass :)

larowlan’s picture

Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 7245f89 and pushed to 8.0.x. Thanks!

  • alexpott committed 7245f89 on 8.0.x
    Issue #2321739 by jibran: Fixed Minor issue in...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.