Skip to content

Stop type conversion for certain keys in query #2205

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 30, 2020

Conversation

malarzm
Copy link
Member

@malarzm malarzm commented Jun 26, 2020

Q A
Type bug
BC Break no
Fixed issues #2193, #2194, #2199

@malarzm malarzm force-pushed the prepare-expressions branch from d91b02c to 53fa39d Compare June 26, 2020 20:48
@alcaeus alcaeus self-requested a review June 29, 2020 08:11
@@ -1031,6 +1031,10 @@ private function convertToDatabaseValue(string $fieldName, $value)
{
if (is_array($value)) {
foreach ($value as $k => $v) {
if ($k === '$exists' || $k === '$type' || $k === '$currentDate') {
Copy link
Member

Choose a reason for hiding this comment

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

Looking at the query operators in MongoDB, there are a few more that we'll want to take another look at ($expr, $text, $mod, etc.) as they don't require type conversion based on the field type. However, I'm fine taking care of those in a separate PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants