You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#45453 On this pr and in the release of 9.46 the behaviour of findMany changed.
Consider the following query Category::query()->findMany($categoryIds) where the categoryIds has the following format:
array:2 [
0 => array:1 [
"category_id" => 34234234
],
1 => array:1 [
"category_id" => 6756767567
]
];
And because it would use the regular whereIn method it would basically flatten the array resulting in the query
"where id IN (34234234,6756767567)".
After that change we are using the IntegerInRaw which casts the array to int resulting in the query of where id IN (1,1).
Don't know if that was intentional or not but it does change the previous behaviour.
Steps To Reproduce:
Basically pass an array of arrays in the findMany in latest version of the framework
The text was updated successfully, but these errors were encountered:
Description:
#45453 On this pr and in the release of 9.46 the behaviour of findMany changed.
Consider the following query Category::query()->findMany($categoryIds) where the categoryIds has the following format:
array:2 [
0 => array:1 [
"category_id" => 34234234
],
1 => array:1 [
"category_id" => 6756767567
]
];
And because it would use the regular whereIn method it would basically flatten the array resulting in the query
"where id IN (34234234,6756767567)".
After that change we are using the IntegerInRaw which casts the array to int resulting in the query of where id IN (1,1).
Don't know if that was intentional or not but it does change the previous behaviour.
Steps To Reproduce:
Basically pass an array of arrays in the findMany in latest version of the framework
The text was updated successfully, but these errors were encountered: