Problem/Motivation

The concept of forward revisions was introduced in #218755: Support revisions in different states. Entity query currently returns zero results for any entity that has a forward revision.

For example, create node 1, vid 1, set to current revision. Create a new revision of that node (vid 2), but not set to the current revision. Entity query will return empty:

     $nids = \Drupal::entityQuery('node')
        ->condition('nid', [1], 'IN')
        ->execute();

Attached is a test that illustrates the failure.

Proposed resolution

Remaining tasks

User interface changes

API changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhedstrom’s picture

The test-only patch.

Status: Needs review » Needs work

The last submitted patch, 1: entity-query-2465323-01-TEST-ONLY.patch, failed testing.

jhedstrom’s picture

Status: Needs work » Closed (duplicate)

This is a duplicate of #2458543: Entity query age(EntityStorageInterface::FIELD_LOAD_REVISION) only gets current revision ID. The test here has been added to that patch.