Skip to content
Snippets Groups Projects

Draft: Issue #3256162: Entity query %delta conditions do not work properly with most operators or OR condition groups

Open Draft: Issue #3256162: Entity query %delta conditions do not work properly with most operators or OR condition groups
1 file
+ 29
0
Compare changes
  • Side-by-side
  • Inline
@@ -732,6 +732,35 @@ public function testDelta() {
->execute();
$this->assertResult();
// Using a different operator than "=" should still yield the correct
// results.
$this->queryResults = $this->storage
->getQuery()
->accessCheck(FALSE)
->condition("id.%delta.value", [1, 3, 5], 'IN')
->condition("id.%delta", 1, '<')
->sort('id')
->execute();
$this->assertResult(1, 3, 5);
// An delta range condition as part of an OR condition group should always
// return all results.
$this->queryResults = $this->storage
->getQuery()
->accessCheck(FALSE)
->condition("id.%delta.value", 99, '=')
->sort('id')
->execute();
$this->assertResult();
$this->queryResults = $this->storage
->getQuery('OR')
->accessCheck(FALSE)
->condition("id.%delta.value", 99, '=')
->condition("id.%delta", 0, '=')
->sort('id')
->execute();
$this->assertResult(range(0, 15));
}
/**
Loading