[PR #6476] Allow arithmetic expressions within IN operator #9995

Closed
opened 2026-01-22 16:06:05 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/6476

State: closed
Merged: No


In some cases it is necessary to use not only scalar values or subselects within IN-conditions, but also own functions.

With Oracle databases, the following is then possible:

DQL:
SELECT u FROM User WHERE u.name IN ( CUSTOM_DQL_FUNCTION() );

SQL:
SELECT * FROM user WHERE name IN ( SELECT * FROM TABLE(ORACLE_PLSQL_FUNCTION()) );

Another example which is also possible now:

DQL:
[...] WHERE field IN ( CUSTOM_DQL_GET_ID('Foo'), CUSTOM_ESCAPE('Bar') )

SQL:
[...] WHERE field IN ( (SELECT id FROM settings WHERE name = 'Foo'), [...] )

**Original Pull Request:** https://github.com/doctrine/orm/pull/6476 **State:** closed **Merged:** No --- In some cases it is necessary to use not only scalar values or subselects within IN-conditions, but also own functions. With Oracle databases, the following is then possible: DQL: `SELECT u FROM User WHERE u.name IN ( CUSTOM_DQL_FUNCTION() );` SQL: `SELECT * FROM user WHERE name IN ( SELECT * FROM TABLE(ORACLE_PLSQL_FUNCTION()) );` Another example which is also possible now: DQL: `[...] WHERE field IN ( CUSTOM_DQL_GET_ID('Foo'), CUSTOM_ESCAPE('Bar') )` SQL: `[...] WHERE field IN ( (SELECT id FROM settings WHERE name = 'Foo'), [...] )`
admin added the pull-request label 2026-01-22 16:06:05 +01:00
admin closed this issue 2026-01-22 16:06:05 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#9995