Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
vdc-minor-bug-fail.patch | 1014 bytes | jibran | |
vdc-minor-bug.patch | 1.04 KB | jibran | |
Comments
Comment #1
jibranFail patch will also pass :)
Comment #2
larowlanComment #3
alexpottCommitted 7245f89 and pushed to 8.0.x. Thanks!