Cannot filter using equalTo/endAt/startAt with strings
Mogball opened this issue · 2 comments
Mogball commented
Trying to do $database->ref('some/path')->orderByChild('childname').equalTo('stringvalue')->...
Will throw an error: "Constraint index field must be a JSON primitive".
So it seems strings don't work, but performing the same query in, say, javascript Firebase, is allowed with strings.
mastef commented
@Mogball See https://stackoverflow.com/a/41991196/10728554 or #58 about adding quotes around your strings.
Also the updated documentation has a case for this https://github.com/ktamas77/firebase-php#supported-commands.