From 9ae7671b26ec4631fec262442becc0f406650f7a Mon Sep 17 00:00:00 2001 From: guilhermeblanco Date: Tue, 30 Mar 2010 22:29:10 +0000 Subject: [PATCH] [2.0] Added more verbosity when attempting to iterate through a fetch join. --- lib/Doctrine/ORM/Query/QueryException.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/Query/QueryException.php b/lib/Doctrine/ORM/Query/QueryException.php index b889f65e8..2685d3555 100644 --- a/lib/Doctrine/ORM/Query/QueryException.php +++ b/lib/Doctrine/ORM/Query/QueryException.php @@ -116,9 +116,11 @@ class QueryException extends \Doctrine\ORM\ORMException ); } - // TODO: Add the $assoc to the error message public static function iterateWithFetchJoinNotAllowed($assoc) { - return new self("Iterate with fetch join not allowed"); + return new self( + "Iterate with fetch join in class " . $assoc->sourceEntityName . + " using association " . $assoc->sourceFieldName . " not allowed." + ); } public static function associationPathCompositeKeyNotSupported()