1
0
mirror of synced 2025-01-20 15:31:40 +03:00

[2.0] Added exception if query builder is missing from or select when trying to get dql string

This commit is contained in:
jwage 2009-10-04 00:06:22 +00:00
parent b9ec48d68e
commit fb7adbbebb

View File

@ -21,7 +21,8 @@
namespace Doctrine\ORM; 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 * This class is responsible for building DQL query strings via an object oriented
@ -191,6 +192,10 @@ class QueryBuilder
return $this->_dql; return $this->_dql;
} }
if ( ! $this->_dqlParts['select'] || ! $this->_dqlParts['from']) {
throw DoctrineException::incompleteQueryBuilder();
}
$dql = ''; $dql = '';
switch ($this->_type) { switch ($this->_type) {