-
Notifications
You must be signed in to change notification settings - Fork 1.4k
PHPORM-320 Fix aliasing .id field path to ._id #3353
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
Conversation
@@ -34,20 +34,19 @@ jobs: | |||
- "11.*" | |||
- "12.*" | |||
driver: | |||
- 1 | |||
- 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to change the default driver version that is tested to match the ruleset from #3347
'$or' => [ | ||
[ | ||
'$and' => [ | ||
['_id' => 10], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are flaws in the conversion if you use advanced queries. This transformation from id
to _id
is done in the compileWheres
from the “column name”:
laravel-mongodb/src/Query/Builder.php
Lines 1209 to 1212 in bdae18d
// Compatibility with Eloquent queries that uses "id" instead of MongoDB's _id | |
if ($where['column'] === 'id') { | |
$where['column'] = '_id'; | |
} |
Fix PHPORM-320
Fix #3351
Checklist