Problem/Motivation

When we call GroupRelationshipStorage's ::loadByEntity() or ::loadByEntityAndGroup() methods for a config entity, we ask the ConfigWrapperStorage for a wrapper without setting the $create_if_missing flag to FALSE.

This means we will create and save a wrapper for ungrouped entities that we know won't return any results and then run a query against this wrapper's ID. We can optimize this for better performance.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork group-3527042

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

kristiaanvandeneynde created an issue. See original summary.

kristiaanvandeneynde’s picture

Assigned: kristiaanvandeneynde » Unassigned
Status: Active » Needs review

kristiaanvandeneynde’s picture

Title: Attemtping to load group relationships by entity creates a ConfigWrapper for ungrouped entities » Attempting to load group relationships by entity creates a ConfigWrapper for ungrouped entities

Test-only fails, full MR goes green. I call that a win :D

kristiaanvandeneynde’s picture

Status: Needs review » Fixed

Backporting as we speak.

Status: Fixed » Closed (fixed)

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