Add path expresion to QueryException::associationPathInverseSideNotSupported()
This commit is contained in:
parent
33cee11e6f
commit
633a442046
@ -204,13 +204,15 @@ class QueryException extends \Doctrine\ORM\ORMException
|
||||
}
|
||||
|
||||
/**
|
||||
* @param object $pathExpr
|
||||
*
|
||||
* @return QueryException
|
||||
*/
|
||||
public static function associationPathInverseSideNotSupported()
|
||||
public static function associationPathInverseSideNotSupported($pathExpr)
|
||||
{
|
||||
return new self(
|
||||
"A single-valued association path expression to an inverse side is not supported".
|
||||
" in DQL queries. Use an explicit join instead."
|
||||
"A single-valued association path expression to an inverse side is not supported in DQL queries. " .
|
||||
"Instead of '" . $pathExpr->identificationVariable . "." . $pathExpr->field . "' use an explicit join."
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -671,7 +671,7 @@ class SqlWalker implements TreeWalker
|
||||
$assoc = $class->associationMappings[$fieldName];
|
||||
|
||||
if ( ! $assoc['isOwningSide']) {
|
||||
throw QueryException::associationPathInverseSideNotSupported();
|
||||
throw QueryException::associationPathInverseSideNotSupported($pathExpr);
|
||||
}
|
||||
|
||||
// COMPOSITE KEYS NOT (YET?) SUPPORTED
|
||||
|
Loading…
x
Reference in New Issue
Block a user