• Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: Git Master
    • Fix Version/s: None
    • Component/s: DQL
    • Security Level: All
    • Labels:


      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:

      SELECT p FROM Player p
      WHERE NOT :team MEMBER OF p.targetedBy

      Here is the current generated SQL:

      WHERE NOT EXISTS (SELECT 1 FROM player_team p1_ INNER JOIN Team t2_ ON p1_.team_id = WHERE p1_.player_id = AND = ?)

      whereas it could drop the join:

      WHERE NOT EXISTS (SELECT 1 FROM player_team p1_ WHERE p1_.player_id = AND p1_.team_id = ?)


        Christophe Coevoet created issue -

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to failed: Error in remote call to 'FishEye 0 (' ( [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DDC-2076, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)


          • Assignee:
            Benjamin Eberlei
            Christophe Coevoet
          • Votes:
            0 Vote for this issue
            1 Start watching this issue


            • Created: