Change record status: 
Project: 
Introduced in branch: 
8.x
Description: 

If your module extends the DatabaseStorageController class and wants to reuse the default SQL Query backend in Drupal\Core\Entity\Query\Sql\Query then you need to extend the QueryFactory class in a new namespace with the same name but you do not need to write any code; it will just work. Say,

namespace Drupal\foo\Entity\Mystorage;

use Drupal\Core\Entity\Query\Sql\QueryFactory as BaseQueryFactory

class QueryFactory extends  BaseQueryFactory {
}

will return instances of class Drupal\foo\Entity\Mystorage\Query if it exists, if not then class Drupal\Core\Entity\Query\Sql\Query. Once the empty QueryFactory is added, the system automatically will pick up the Query, QueryAggregate, Condition and Table classes in the current or any of the parent namespaces as adequate.

Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done