-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
Hello there,
We have a use case where we need to query the content by specifying one of the fields as null. So the use case would be that you have a content with optional field and distinguish between having it filled in with certain value or not filled at all.
Example:
| ID | field1 | field2 |
|---|---|---|
| 1 | value1 | |
| 2 | value1 | value2 |
Q1: ?query={"field1": "value1", "field2": null} will return id 1
Q2: ?query={"field1": "value1", "field2":"value2"} will return id 2
I noticed that in the implementation you're currently using a JSONObject.put which in case I call query.put("field1", null) actually removed the key field1 from the object instead of adding it as a value.
Is there currently a workaround how to query values like that (except querying all models that fit it and check for the field manually)?
Metadata
Metadata
Assignees
Labels
No labels