1
0
mirror of synced 2025-01-20 07:21: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;
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) {