[PR #6325] Improve exception message for DQL single-valued association path expression to an inverse side (unsupported) #9944

Open
opened 2026-01-22 16:05:55 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/6325

State: closed
Merged: No


Hello,
I have added path expression to the exception about single-valued association to an inverse side being not supported. The path expression makes it easier to identify the issue among many other expression in potentially complex query.

Seems like many people had an issue with this exception.

For a query:

SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.address IN (?1, ?2)

The exception message before:

A single-valued association path expression to an inverse side is not supported in DQL queries. Use an explicit join instead.

The exception message after:

A single-valued association path expression to an inverse side is not supported in DQL queries. Instead of 'u.address' use an explicit join.

**Original Pull Request:** https://github.com/doctrine/orm/pull/6325 **State:** closed **Merged:** No --- Hello, I have added path expression to the exception about single-valued association to an inverse side being not supported. The path expression makes it easier to identify the issue among many other expression in potentially complex query. [Seems like many people had an issue with this exception.](https://www.google.com/search?q=A+single-valued+association+path+expression+to+an+inverse+side+is+not+supported+in+DQL+queries.) For a query: ```sql SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.address IN (?1, ?2) ``` The exception message before: > A single-valued association path expression to an inverse side is not supported in DQL queries. Use an explicit join instead. The exception message after: > A single-valued association path expression to an inverse side is not supported in DQL queries. Instead of 'u.address' use an explicit join.
admin added the pull-request label 2026-01-22 16:05:55 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#9944