[2.0] Added exception if query builder is missing from or select when trying to get dql string
This commit is contained in:
parent
b9ec48d68e
commit
fb7adbbebb
@ -21,7 +21,8 @@
|
||||
|
||||
namespace Doctrine\ORM;
|
||||
|
||||
use Doctrine\ORM\Query\Expr;
|
||||
use Doctrine\ORM\Query\Expr,
|
||||
Doctrine\Common\DoctrineException;
|
||||
|
||||
/**
|
||||
* This class is responsible for building DQL query strings via an object oriented
|
||||
@ -191,6 +192,10 @@ class QueryBuilder
|
||||
return $this->_dql;
|
||||
}
|
||||
|
||||
if ( ! $this->_dqlParts['select'] || ! $this->_dqlParts['from']) {
|
||||
throw DoctrineException::incompleteQueryBuilder();
|
||||
}
|
||||
|
||||
$dql = '';
|
||||
|
||||
switch ($this->_type) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user