Problem/Motivation

QueryInterface::execute() returns revision ids as keys if the entity supports revision and entity ids if not.

Using array_keys() of its result as argument for EntityStorageInterface::loadMultiple() for entity types with revisioning will incorrectly use revision ids to load entities.

Proposed resolution

Drop array_keys()

Remaining tasks

(reviews needed, tests to be written or run, documentation to be written, etc.)

User interface changes

None

API changes

None

Data model changes

None

CommentFileSizeAuthor
#3 2730127-2.patch747 bytescasey
#2 2730127-1.patch639 bytescasey

Comments

casey created an issue. See original summary.

casey’s picture

Status: Active » Needs review
StatusFileSize
new639 bytes
casey’s picture

StatusFileSize
new747 bytes

Arrr sleeping

The last submitted patch, 2: 2730127-1.patch, failed testing.

The last submitted patch, 2: 2730127-1.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 3: 2730127-2.patch, failed testing.

The last submitted patch, 3: 2730127-2.patch, failed testing.

xano’s picture

Status: Needs work » Fixed

I guess I'm still nostalgic about Drupal 7's entity queries. Well-spotted, and thanks for submitting a patch!

Arrr sleeping

That happens to the best of pirates. Best keep the rum for after coding next time ;-)

  • Xano committed 87614e4 on 8.x-1.x authored by casey
    Issue #2730127 by casey: Uses revision ids as ids for revisionable...

Status: Fixed » Closed (fixed)

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