-
Notifications
You must be signed in to change notification settings - Fork 198
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
Query returns only id not the fields specified. #294
Comments
We have a number of tests for query projections in the driver, so I'd defer to @alcaeus to confirm whether this a bug in mongo-php-adapter. If possible, I'm sure he'd appreciate it if you could turn this into a PHPUnit test case. |
Thanks for bringing this to my attention, @jmikola. I've confirmed the issue exists and I'm trying to figure out whether it's due to a bug in mongo-php-adapter or somewhere else. I'll update here and in the linked ticket once I know more. |
Update: this is indeed a bug with mongo-php-adapter, being fixed in alcaeus/mongo-php-adapter#98. The error occurs when using BSON types in query projections, which were not properly converted to the new types. |
Last update: 1.0.3 of mongo-php-adapter containing a fix was released. |
I'm sure @alcaeus hates me at this point but thanks a ton for your hard work! |
Thanks, @alcaeus! 👍 |
We have the following query.
Using mongdb (and the mongo-php-adapter) I get the following array back.
But with the old driver I receive the data as expected.
Also of note, I'm not 100% sure if this is a driver bug or a bug in the adapter. If this is not from the driver just let me know I'll close and move to the adapter repo.
The text was updated successfully, but these errors were encountered: