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

Open
opened 2026-01-22 12:54:27 +01:00 by admin · 1 comment
Owner

Originally created by @doctrinebot on GitHub (Jul 30, 2010).

Originally assigned to: @guilhermeblanco on GitHub.

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.

Originally created by @doctrinebot on GitHub (Jul 30, 2010). Originally assigned to: @guilhermeblanco on GitHub. 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.
admin added the Improvement label 2026-01-22 12:54:27 +01:00
Author
Owner

@doctrinebot commented on GitHub (Jul 30, 2010):

@doctrinebot commented on GitHub (Jul 30, 2010): - is duplicated by [DDC-1162: Add support for multi-column IN statements](http://www.doctrine-project.org/jira/browse/DDC-1162)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#896