DDC-3814: counting inverse column of in dql #4672

Open
opened 2026-01-22 14:47:19 +01:00 by admin · 0 comments
Owner

Originally created by @doctrinebot on GitHub (Jul 8, 2015).

Originally assigned to: @guilhermeblanco on GitHub.

Jira issue originally created by user Ma27:

I have a self-referenced bidirectional relation in order to show users and their followers. Now I'd like to show the users with the most followers.
But when executing the unit test, doctrine2 tells me that the inverse column user.followers is not valid.

On the first attachement you can see the code. This fetches the user entity and the amount of followers hidden (the followers column is not the owning side, but the inversed column).
On the second picture you can see the complete error message and the call stack

Originally created by @doctrinebot on GitHub (Jul 8, 2015). Originally assigned to: @guilhermeblanco on GitHub. Jira issue originally created by user Ma27: I have a self-referenced bidirectional relation in order to show users and their followers. Now I'd like to show the users with the most followers. But when executing the unit test, doctrine2 tells me that the inverse column user.followers is not valid. On the first attachement you can see the code. This fetches the user entity and the amount of followers hidden (the followers column is not the owning side, but the inversed column). On the second picture you can see the complete error message and the call stack
admin added the Bug label 2026-01-22 14:47:19 +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#4672