Allow optional bidirectional relationships

Created on 9 August 2019, over 5 years ago
Updated 30 June 2024, 6 months ago

Problem/Motivation

In the D7 versions of the module, Corresponding Entity Relationships could be either uni- or bi-directional, allowing for the relationship to be maintained only when changed on one side of the relationship. This functionality is missing in the d8 version, and all relationships are bidirectional, which can cause issues in certain use cases. Given that this was functionality in the previous versions of the module, it probably should exist in the d8 version as well, even though it is not noted in #2951880: 5.0.0 Roadmap β†’ .

Proposed resolution

Implement logic to allow for uni-directional CER to be processed, adapting isValid() to identify these situations and process (or not) depending on the configuration.

Remaining tasks

  • Update hook to prevent setting existing CER to uni directional.
  • Tests?

User interface changes

Needs the ability to specify bidirectionality for the config entity and display that setting on the list page.

API changes

Add the appropriate getter and setters to determine directionality of the entity. Add methods to determine if the relationship should be processed based on that setting.

Data model changes

The bidirectional property of the config entity.

✨ Feature request
Status

Needs work

Version

5.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States logickal

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024