-
-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Included objects in model #10
Comments
Hey
Sorry we haven't added that feature just yet. It would be the case of doing
a double query at the moment from the pointer objects ID.
Hopefully we will get this feature in shortly.
…On Sun, 23 Dec 2018, 15:37 Alexander Buder ***@***.*** wrote:
Hi, is there an example available, where I have an Pointer object included
in an response?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#10>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AHgn3k1ms2RJOA_CLzXY2ox-FfH3cwSCks5u76M7gaJpZM4Zf4sZ>
.
|
Should you need help? Hole long I have to wait for feature? |
Any help would be gratefully appreciated. Obviously with the time of year
it's going to be a bit of a break then straight back to it January.
As the SDK is very immature at the moment, please do pick something your
comfortable with and jump aboard.
…On Sun, 23 Dec 2018, 20:52 Alexander Buder ***@***.*** wrote:
Should you need help? Hole long I have to wait for feature?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHgn3pJpOAX2W2nEGmeUPPLgT9juIDjiks5u7-0NgaJpZM4Zf4sZ>
.
|
Hey, should be able to work with this now? |
For me, it's actually not working but from the REST API Guide, it seems that it could be easier than doing double queries. For example, if we have Diet_Plans objects with GameScore pointer, we can retrieve complete GameScore object with one include.
Update Ok after, I saw that include was possible in the SDK but I test it and it doesn't work.
|
That's not the correct implementation of it... include should be added to a query... i.e. queryBuilder.greaterThan(DietPlan.keyFat, 20);
Try something like that? I'm not sure if the syntax is correct but the include statement simple tells the api to include the full object, rather than just a pointer reference. |
I tried many times and your syntax isn't correct :/ |
Would this work? There was a semi colon added incorrectly. Regardless, build a query that will actually return an object that contains another object. void query() async { |
No, there is en error for the line '..include("gameScore")'
|
This isn't related to the library. Please review the edited comment above. This is Dart syntax issues over library issues. |
I test your code
It's strange because your response variable is not a response (ParseResponse) but it's a QueryBuilder so I don't know how can I print the list of DietPlan for example. Do you have an idea ? |
Apologies, I'm not in front of a computer most times I am responding to you. Have you tried building the query as per the documentation.. i.e.
That should work? |
I have a response but the include doesn't work, I don't have the complete gameScore object. |
Does your DietPlan table have a reference to an object called 'gameScore'? Please can you screenshot your Parse Dashboard with the table DietPlan on screen. Thanks |
https://image.noelshack.com/fichiers/2019/03/3/1547631106-capture-d-ecran-2019-01-16-a-10-30-54.png And the result:
|
Confirmed... This does look like a bug. I'll try and add a fix for 1.0.6. Thanks for letting me know. |
Can we test this again? The code looks identical to other SDK's and should be working? I've added support for query encoding that might potentially work better... |
I test but I doesn't work, I don't have the full object GameScore in my response My code :
My console :
|
I have tested this and it does work. I have a Pointer object in my Parse table, with a mock object in there. A reference to another row in a different table, all works. |
Mmm, can you copy/paste your 2 Model classes please ? Maybe I did something wrong. |
Sent via slack |
I was using parse server sdk in my app for database. I have three class in my Back4App Dashboard which are "_User", "Office", "Office_Members". In Office_Members class it has following columns,
To fetch the data including Pointer to _User as well from Office_Members, I am using following code, QueryBuilder parseQuery = QueryBuilder(ParseObject("Office_Members")) ParseResponse apiResponse = await parseQuery.query(); Output : Payload : [{"className":"Office_Members","objectId":"twpDY51PUK","createdAt":"2020-08-14T09:58:59.775Z","updatedAt":"2020-08-14T09:58:59.775Z","office_id":{"__type":"Pointer","className":"Office","objectId":"4dkfSMrwBI"},"user_id":{"__type":"Pointer","className":"_User","objectId":"Hx5xJ5ABxG"},"count":1}] In my payload response i am not getting whole user_id pointer response. I have followed the parse sdk server documentation throughout to fire parse queries. @phillwiggins @scaneat @aBuder So can you help me that what i might be doing wrong? Thanks. |
@MungaraJay @phillwiggins @scaneat Did you have any luck with this issue. I am also getting same kind of issue. I am trying to fetch the values from my "Office" class and in my office class "user_id" column is the Pointer to my User class. So i also want to include user object. I am trying following code
Output i am getting is : [{"className":" Language ","objectId":"w3U0iHfhkh","createdAt":"2020-08-16T10:23:15.961Z","updatedAt":"2020-08-16T10:23:15.961Z","name":"Lang2199","address":"Address1521","user_id":{"__type":"Pointer","className":"_User","objectId":"zbhsxhpr9x"}}] Update this thread if anyone finds a solution. Thanks. |
@aniket453 This works correctly in version 1.0.26 |
Hi, is there an example available, where I have an Pointer object included in an response?
The text was updated successfully, but these errors were encountered: