Changeset 4862

Show
Ignore:
Timestamp:
08/29/08 21:26:05 (4 months ago)
Author:
jwage
Message:

fixes #1335 - Throw an exception when Doctrine_Query::execute() is called with no from parts

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/1.0/lib/Doctrine/Query/Abstract.php

    r4849 r4862  
    945945        if ($hydrationMode !== null) { 
    946946            $this->_hydrator->setHydrationMode($hydrationMode); 
     947        } 
     948 
     949        if (empty($this->_dqlParts['from']) && empty($this->_sqlParts['from'])) { 
     950            throw new Doctrine_Query_Exception('You must have at least one component specified in your from.'); 
    947951        } 
    948952