mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-2076: Optimization for MEMBER OF #2617
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Oct 14, 2012).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user stof:
Currently, using MEMBER OF for a ManyToMany collection does a join on the table of the related entity, whereas all it needs is in the join table.
Using the following DQL:
Here is the current generated SQL:
whereas it could drop the join:
@doctrinebot commented on GitHub (May 28, 2015):
Comment created by stof:
[~guilhermeblanco] is there any case where the CollectionMemberExpression would really need to join the target entity table rather than just using the join table ? I don't see any
@acasademont commented on GitHub (Feb 23, 2017):
This would come in really handy!
Also, shouldn't this syntax work in a similar way?
SELECT p FROM Player p WHERE p.targetedBy IN :teamand automatically joining only the join table.