-
-
Notifications
You must be signed in to change notification settings - Fork 205
whereEqualTo Pointer returns no results #57
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
Comments
The issue is that your trying to search for a string, but the operator object is not a string, it's a pointer. Create an instance of your operator object with the ID that your trying to search. Then when querying call
|
Sorry but how exactly get instance of Operator Object ? |
Create an instance of that object. Create a constructor, or from JSON etc
etc
…On Sun, Jan 27, 2019, 09:49 Saif Allah Khaled ***@***.*** wrote:
Sorry but how exactly get instance of Operator Object ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#57 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHgn3so9TsJN1qr_AwieTH9aLFI7JDNIks5vHXY6gaJpZM4aUjqh>
.
|
still getting zero results ,, i'm miss understanding ? |
Hmmm, strange. I've got a very similar query that seems to work. I will
check later when I'm in front of a computer for you.
…On Sun, Jan 27, 2019, 10:45 Saif Allah Khaled ***@***.*** wrote:
var y = ParseObject("Operator")..set("objectId", "E5um4KqOMD");
// {"className":"Operator","objectId":"E5um4KqOMD"}
var query = QueryBuilder<SubscriptionParse>(SubscriptionParse())
..whereEqualTo('operator', y.toPointer());
// as pointer => {'__type': 'Pointer', className: Operator, objectId: E5um4KqOMD}
still getting zero results ,, i'm miss understanding ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#57 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHgn3oO6sv0YLVtWquORNVehWIEqQ68Rks5vHYM0gaJpZM4aUjqh>
.
|
Might have fixed this in the recent release. Potentially was an encoding issue. I have the updated version on our develop branch if you wish to test again. |
Okay ,, the encoding changed a bit ,,
now getting :
|
tried changing the encoding in parse_encoder.dart
instead of
changed double Quotes to single Quote
|
I'm stumped. I recreated your object, and table setup. I noticed an issue with encoding again... But that still has not returned any results. I checked my output against the documentation and it just doesn't seem to bring any results back. |
I've encountered the same issue when trying to query with pointers. I used the parse console to test out some queries and this is what works ok in the console : where={"owner": {"__type": "Pointer","className":"_User", "objectId": "vKstDRHhfr"}} Comparing this to what is happening in the parse server sdk, it appears that because the value is being encoded into a string, in ParseQuery @ line 233 it then adds additional quotes around the value var value = convertValueToCorrectType(columnAndValue.value); So it ends up as where={"owner": "{"__type": "Pointer","className":"_User", "objectId": "vKstDRHhfr"}"} I changed the code at line 233 to : and this made the query work ok. So I think that is the issue. Hope that helps, and many thanks for developing the SDK, a great job ! |
Noticed another minor thing, when objects are being returned from queries the className field is being set to "className" instead of the object type. It's being caused when the parse objects are cloned, in ParseObject the className field is always set to 'ClassName' when cloned. class ParseObject extends ParseBase implements ParseCloneable { Not sure if this was meant to be this way for some other reason, but if the className is passed through it fixes this. class ParseObject extends ParseBase implements ParseCloneable { Only minor things, otherwise it's working really nicely ! |
@CodeGenie1
|
Thanks @RodrigoSMarques. This was resolved in version 1.0.15. |
DB :
https://i.ibb.co/RQsn3CG/Untitled.jpg
when i try to query with
i get no result found ,, shouldn't i get 5 results ?
SubscriptionParse Class :
The text was updated successfully, but these errors were encountered: