Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-726

DQL should deal correctly with composite primary keys

    Details

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

      Description

      DQL should deal correctly with composite primary keys:

      SELECT u FROM User u WHERE u.CompositeAssocEntity = ?1
      
      Should be converted to:
      
      SELECT ... FROM users u WHERE (u.cae_id1, u.cae_id2) = (?, ?) // or something similar
      

      It also supports IN expressions:

      SELECT u FROM User u WHERE u.CompositeAssocEntity IN (?1, ?2)
      
      Should be converted to:
      
      SELECT ... FROM users u WHERE (u.cae_id1, u.cae_id2) IN ((?, ?), (?, ?)) // or something similar
      

      MySQL, SQLite and PgSQL works smoothly.
      Need to check out MSSQL, Oracle and DB2.

        Issue Links

          Activity

            People

            • Assignee:
              Guilherme Blanco
              Reporter:
              Guilherme Blanco
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: