-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Parse/Node: Problems with select and include after merging GH-2809 GH-2737 #2876
Comments
this should be fixed by #2809 actually, can you try using in your package.json:
|
@flovilmart I am having the same issues, destroyed my node_modules, did a reinstall and got the same error with basic query. As soon as I use a select the include goes away and the funny thing is that when you use both the __type attribute changes from Pointer to Object, so I am not sure if that is normal or not? |
after reviewing your new update for select keys, I see that the select needs to have the __type as Pointer rather then Object, do you think that is where the issue resides? @flovilmart |
@developerX what version are you running? Are you running on the #latest instead of 2.2.22? |
@flovilmart yeah I am running the latest with your code snippet from above inside my package.json file |
What query are you using exactly? Is it similar to: https://github.com/ParsePlatform/parse-server/pull/2809/files#diff-a6c5eb08fd4bf0d5b33da1eae79112f3R1972 |
Yeah I am so I did a little more testing and it seems like you have to be specific on what you would like to include when using a select statement. Here is what I am running into. When I run a query and use include with no select it will include the entire pointer the way I would like. When I use a select that same pointer return only the the special indexes (objectId, createdAt, updatedAt, etc.) and nothing else. With the provided information above by @uluru-phatnguyen he would be able to achieve what he wants by simply adding "createdBy.shop" into his select statement and it should do what they want. Looking at the test that was written for "gameScore" it would pass because it provides an ID and the other field is not defined. if you try writing a test with nested pointers the test will fail because the select strips all additional information before the include can even include the other fields. Does that make any sense? |
@developerX why don't you write a failing test for showing exactly what you mean or even better, propose a PR? |
@flovilmart DO NOT specific:
Any the best solution? @developerX |
If you don't use parse-server then this is not an issue. When using select in conjunction with include, you should also call add all the keys you want to have with your include. |
I use
After upgrade parse-server to 2.2.22, I have problems with my code:
I tracked on github, I think problems from 2 pull-request GH-2809, GH-2737.
Please suggest for me solution for this problems.
Many thanks.
The text was updated successfully, but these errors were encountered: