Skip to content

feature "Add include option to getObject in 3.1.7" with error for me #813

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

Closed
4 tasks done
catalunha opened this issue Dec 24, 2022 · 2 comments · Fixed by #814
Closed
4 tasks done

feature "Add include option to getObject in 3.1.7" with error for me #813

catalunha opened this issue Dec 24, 2022 · 2 comments · Fixed by #814
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@catalunha
Copy link

catalunha commented Dec 24, 2022

New Issue Checklist

Issue Description

Congratulations and thank you @mbfakourii for your contributions.

I have a test project that can be accessed here:
https://github.com/catalunha/learning_about_b4a_dart
Updating to parse_server_sdk: ^3.1.8 exclusively to test the Add include option to getObject feature I got an error.
See the output with the standard getObject, without include. Everything works normally.

await ParseObject(AuthorEntity.className).getObject(objectId);

╭-- Parse Request
curl -X GET -H 'user-agent: Flutter Parse SDK 3.1.8' -H 'X-Parse-Application-Id: 123' -H 'X-Parse-Client-Key: 123' https://parseapi.back4app.com/classes/Author/wumssuy5eQ

 https://parseapi.back4app.com/classes/Author/wumssuy5eQ
╰--
╭-- Parse Response
Class: Author
Function: ParseApiRQ.get
Status Code: 200
Payload: {"className":"Author","objectId":"wumssuy5eQ","createdAt":"2022-12-24T09:54:13.421Z","updatedAt":"2022-12-24T09:54:13.421Z","typeString":"Author01","typeBoolean":true,"typeNumber":1,"typeDateTime":{"__type":"Date","iso":"2022-12-24T09:54:00.000Z"},"typeArray":["a","1"],"typePointerGenre":{"__type":"Pointer","className":"Genre","objectId":"KinHJTTxv5"}}
╰-- 

See output with getObject and include. Note the error it returned to me.

await ParseObject(AuthorEntity.className).getObject(objectId, include: ['typePointerGenre']);

╭-- Parse Request
curl -X GET -H 'user-agent: Flutter Parse SDK 3.1.8' -H 'X-Parse-Application-Id: 123' -H 'X-Parse-Client-Key: 123' https://parseapi.back4app.com/classes/Author/wumssuy5eQ%3Finclude=typePointerGenre

 https://parseapi.back4app.com/classes/Author/wumssuy5eQ?include=typePointerGenre
╰--
╭-- Parse Response
Class: Author
Function: ParseApiRQ.get
Status Code: 101
Type: ObjectNotFound
Error: Object not found.
╰-- 

I found it strange because everything should work correctly with the feature, and I decided to report it here.

Am I doing something wrong?

Environment

Dart version:

  • Dart SDK version: 2.18.4 (stable) (Tue Nov 1 15:15:07 2022 +0000) on "linux_x64"

Dart project pubspec.yaml:

  • parse_server_sdk: ^3.1.8

Parse Version in back4app

  • 4.5.0

Database Version in back4app

  • mongodb 3.6

Operating system version:

  • Linux PopOS
@parse-github-assistant
Copy link

parse-github-assistant bot commented Dec 24, 2022

Thanks for opening this issue!

  • ❌ Please edit your post and use the provided template when creating a new issue. This helps everyone to understand your post better and asks for essential information to quicker review the issue.

@mbfakourii mbfakourii added the type:bug Impaired feature or lacking behavior that is likely assumed label Dec 24, 2022
@mbfakourii
Copy link
Member

@catalunha Thanks for checking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants