diff -u b/core/lib/Drupal/Core/Entity/Query/QueryBase.php b/core/lib/Drupal/Core/Entity/Query/QueryBase.php --- b/core/lib/Drupal/Core/Entity/Query/QueryBase.php +++ b/core/lib/Drupal/Core/Entity/Query/QueryBase.php @@ -183,8 +183,8 @@ * An object holding a group of conditions. */ protected function conditionGroupFactory($conjunction = 'AND') { - preg_match('/^(.*)\\\\/', get_class($this), $matches); - $class = $matches[1] .'\\Condition'; + preg_match('/^.*\\\\/', get_class($this), $matches); + $class = $matches[0] .'Condition'; return new $class($conjunction, $this); } diff -u b/core/lib/Drupal/Core/Entity/Query/Sql/Query.php b/core/lib/Drupal/Core/Entity/Query/Sql/Query.php --- b/core/lib/Drupal/Core/Entity/Query/Sql/Query.php +++ b/core/lib/Drupal/Core/Entity/Query/Sql/Query.php @@ -320,8 +320,8 @@ * @return \Drupal\Core\Entity\Query\Sql\TablesInterface */ public function getTables(SelectInterface $sql_query) { - preg_match('/^(.*)\\\\/', get_class($this), $matches); - $class = $matches[1] .'\\Tables'; + preg_match('/^.*\\\\/', get_class($this), $matches); + $class = $matches[0] .'Tables'; return new $class($sql_query); } diff -u b/core/lib/Drupal/Core/Entity/Query/Sql/QueryFactory.php b/core/lib/Drupal/Core/Entity/Query/Sql/QueryFactory.php --- b/core/lib/Drupal/Core/Entity/Query/Sql/QueryFactory.php +++ b/core/lib/Drupal/Core/Entity/Query/Sql/QueryFactory.php @@ -49,8 +49,8 @@ * The factored query. */ public function get($entity_type, $conjunction, EntityManager $entity_manager) { - preg_match('/^(.*)\\\\/', get_class($this), $matches); - $class = $matches[1] .'\\Query'; + preg_match('/^.*\\\\/', get_class($this), $matches); + $class = $matches[0] .'Query'; return new $class($entity_type, $entity_manager, $conjunction, $this->connection); } @@ -67,8 +67,8 @@ * The factored aggregation query. */ public function getAggregate($entity_type, $conjunction, EntityManager $entity_manager) { - preg_match('/^(.*)\\\\/', get_class($this), $matches); - $class = $matches[1] .'\\QueryAggregate'; + preg_match('/^.*\\\\/', get_class($this), $matches); + $class = $matches[0] .'QueryAggregate'; return new $class($entity_type, $entity_manager, $conjunction, $this->connection); }