mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #6476] Allow arithmetic expressions within IN operator #9995
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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'), [...] )