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
Comments
Comment #1
jhedstromThe test-only patch.
Comment #3
jhedstromThis 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.