Loading core/lib/Drupal/Core/Entity/Query/Sql/Condition.php +1 −1 Changes for core/lib/Drupal/Core/Entity/Query/Sql/Condition.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ public function compile($conditionContainer) { // Add the SQL query to the object before calling this method again. $sql_condition->sqlQuery = $sql_query; $condition['field']->compile($sql_condition); $conditionContainer->condition($sql_condition); $sql_query->condition($sql_condition); } else { $type = strtoupper($this->conjunction) == 'OR' || $condition['operator'] == 'IS NULL' ? 'LEFT' : 'INNER'; Loading core/modules/system/src/Tests/Entity/EntityQueryTest.php +0 −36 Changes for core/modules/system/src/Tests/Entity/EntityQueryTest.php: 0 added lines, 36 removed lines. Original line number Diff line number Diff line Loading @@ -40,13 +40,6 @@ class EntityQueryTest extends EntityUnitTestBase { */ protected $factory; /** * A list of bundle machine names created for this test. * * @var string[] */ protected $bundles; /** * Field name for the greetings field. * Loading Loading @@ -140,7 +133,6 @@ protected function setUp() { } $entity->save(); } $this->bundles = $bundles; $this->figures = $figures; $this->greetings = $greetings; $this->factory = \Drupal::service('entity.query'); Loading Loading @@ -488,34 +480,6 @@ public function testCount() { $this->assertFalse($count); } /** * Tests that nested condition groups work as expected. */ public function testNestedConditionGroups() { // Query for all entities of the first bundle that have either a red // triangle as a figure or the Turkish greeting as a greeting. $query = $this->factory->get('entity_test_mulrev'); $first_and = $query->andConditionGroup() ->condition($this->figures . '.color', 'red') ->condition($this->figures . '.shape', 'triangle'); $second_and = $query->andConditionGroup() ->condition($this->greetings . '.value', 'merhaba') ->condition($this->greetings . '.format', 'format-tr'); $or = $query->orConditionGroup() ->condition($first_and) ->condition($second_and); $this->queryResults = $query ->condition($or) ->condition('type', reset($this->bundles)) ->sort('id') ->execute(); $this->assertResult(6, 14); } protected function assertResult() { $assert = array(); $expected = func_get_args(); Loading Loading
core/lib/Drupal/Core/Entity/Query/Sql/Condition.php +1 −1 Changes for core/lib/Drupal/Core/Entity/Query/Sql/Condition.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ public function compile($conditionContainer) { // Add the SQL query to the object before calling this method again. $sql_condition->sqlQuery = $sql_query; $condition['field']->compile($sql_condition); $conditionContainer->condition($sql_condition); $sql_query->condition($sql_condition); } else { $type = strtoupper($this->conjunction) == 'OR' || $condition['operator'] == 'IS NULL' ? 'LEFT' : 'INNER'; Loading
core/modules/system/src/Tests/Entity/EntityQueryTest.php +0 −36 Changes for core/modules/system/src/Tests/Entity/EntityQueryTest.php: 0 added lines, 36 removed lines. Original line number Diff line number Diff line Loading @@ -40,13 +40,6 @@ class EntityQueryTest extends EntityUnitTestBase { */ protected $factory; /** * A list of bundle machine names created for this test. * * @var string[] */ protected $bundles; /** * Field name for the greetings field. * Loading Loading @@ -140,7 +133,6 @@ protected function setUp() { } $entity->save(); } $this->bundles = $bundles; $this->figures = $figures; $this->greetings = $greetings; $this->factory = \Drupal::service('entity.query'); Loading Loading @@ -488,34 +480,6 @@ public function testCount() { $this->assertFalse($count); } /** * Tests that nested condition groups work as expected. */ public function testNestedConditionGroups() { // Query for all entities of the first bundle that have either a red // triangle as a figure or the Turkish greeting as a greeting. $query = $this->factory->get('entity_test_mulrev'); $first_and = $query->andConditionGroup() ->condition($this->figures . '.color', 'red') ->condition($this->figures . '.shape', 'triangle'); $second_and = $query->andConditionGroup() ->condition($this->greetings . '.value', 'merhaba') ->condition($this->greetings . '.format', 'format-tr'); $or = $query->orConditionGroup() ->condition($first_and) ->condition($second_and); $this->queryResults = $query ->condition($or) ->condition('type', reset($this->bundles)) ->sort('id') ->execute(); $this->assertResult(6, 14); } protected function assertResult() { $assert = array(); $expected = func_get_args(); Loading