DDC-726: DQL should deal correctly with composite primary keys #5238

Open
doctrinebot opened this Issue Jul 30, 2010 · 1 comment

2 participants

@doctrinebot

Jira issue originally created by user @guilhermeblanco:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment