Skip to content

No implicit IN operator for condition with array value#1092

Merged
mvorisek merged 3 commits intodevelopfrom
no_implicit_array_in_condition
Apr 7, 2025
Merged

No implicit IN operator for condition with array value#1092
mvorisek merged 3 commits intodevelopfrom
no_implicit_array_in_condition

Conversation

@mvorisek
Copy link
Copy Markdown
Member

@mvorisek mvorisek commented Feb 9, 2023

Value can be array which is not rare for json DBAL type, thus we cannot check if value is an array nor infer this from SQL expression.

@mvorisek mvorisek force-pushed the no_implicit_array_in_condition branch 2 times, most recently from f292d95 to ef1fdd2 Compare February 10, 2023 00:25
@mvorisek mvorisek force-pushed the no_implicit_array_in_condition branch from ef1fdd2 to eb9f33f Compare August 12, 2023 13:43
@mvorisek mvorisek force-pushed the no_implicit_array_in_condition branch from eb9f33f to 32d1ae9 Compare February 23, 2024 14:03
@mvorisek mvorisek force-pushed the no_implicit_array_in_condition branch from 32d1ae9 to 8a9e01a Compare June 8, 2024 11:09
@mvorisek mvorisek force-pushed the no_implicit_array_in_condition branch 3 times, most recently from e854ec9 to fe23290 Compare November 23, 2024 14:45
@mvorisek mvorisek force-pushed the no_implicit_array_in_condition branch 2 times, most recently from 7c304d9 to f31146b Compare April 6, 2025 23:39
@mvorisek mvorisek added MAJOR and removed BC-break labels Apr 6, 2025
@mvorisek mvorisek force-pushed the no_implicit_array_in_condition branch from 5e1881d to 61b6f36 Compare April 7, 2025 11:17
@mvorisek mvorisek marked this pull request as ready for review April 7, 2025 11:23
@mvorisek mvorisek changed the title No implicit IN condition operator for array value No implicit IN operator for condition with array value Apr 7, 2025
Copy link
Copy Markdown
Member

@DarkSide666 DarkSide666 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but it's quite bad BC break because can't be easily fixed by search/replace.

$key can be Model field name, Field object or Expression object
$operator can be one of the supported operators >, <, >=, <=, !=, in, not in, like, not like, regexp, not regexp
$value can be Field object, Expression object, array (interpreted as 'any of the values') or other scalar value
$value can be Field object, Expression object or any scalar value
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add words "including array" at the end?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For IN operator yes.

@mvorisek mvorisek merged commit 7fff8ad into develop Apr 7, 2025
31 checks passed
@mvorisek mvorisek deleted the no_implicit_array_in_condition branch April 7, 2025 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants