diff --git a/lib/Doctrine/Hydrate.php b/lib/Doctrine/Hydrate.php index ad04886cf..9761dee60 100644 --- a/lib/Doctrine/Hydrate.php +++ b/lib/Doctrine/Hydrate.php @@ -225,6 +225,9 @@ abstract class Doctrine_Hydrate extends Doctrine_Access // copy the aliases to the subquery $obj->copyAliases($this); + // this prevents the 'id' being selected, re ticket #307 + $obj->isSubquery(true); + return $obj; } /**