Support join tables in Doctrine Query Language #7063

Closed
opened 2026-01-22 15:43:59 +01:00 by admin · 2 comments
Owner

Originally created by @tessiancrow on GitHub (Oct 17, 2022).

Feature Request

Q A
New Feature yes
RFC yes
BC Break no

Summary

Why is it not possible to specify a table name in the ->createQueryBuilder, but rather a class? Join tables do not have their own class and if you want to make subqueries with DQL, for example, you have to rely on ->prepare. It would be cool to be able to use table names here as well.

Originally created by @tessiancrow on GitHub (Oct 17, 2022). ### Feature Request | Q | A |------------ | ------ | New Feature | yes | RFC | yes | BC Break | no #### Summary Why is it not possible to specify a table name in the ->createQueryBuilder, but rather a class? Join tables do not have their own class and if you want to make subqueries with DQL, for example, you have to rely on ->prepare. It would be cool to be able to use table names here as well.
admin added the New FeatureWaiting feedback labels 2026-01-22 15:43:59 +01:00
admin closed this issue 2026-01-22 15:44:00 +01:00
Author
Owner

@derrabus commented on GitHub (Oct 17, 2022):

How do you map join tables if you don't have a class for them?

@derrabus commented on GitHub (Oct 17, 2022): How do you map join tables if you don't have a class for them?
Author
Owner

@tessiancrow commented on GitHub (Oct 17, 2022):

In my specific case, there is no mapping to any class, because the join table is generated from the association.

@tessiancrow commented on GitHub (Oct 17, 2022): In my specific case, there is no mapping to any class, because the join table is generated from the association.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#7063