Closed ribrdb closed 5 years ago
After thinking about this some more, it seems like this could be an important case to support. For example if I want to query for all Books that have no Author. I can query for 'Author == null', but not for 'Author property does not exist'.
It is an important use case, and I want to add it.
What do you think is the best way to enable this? Per field? That could be a bit verbose:
message Book {
string author = 1 [(google.firebase.rules.firebase_rules_field).nullable = true];
}
or maybe:
message Book {
[(google.firebase.rules.firebase_rules_message).nullable_fields = true]; // For all fields
string author = 1;
}
WDYT?
Those both look good. Any reason to not support both?
Both is fine.
This is implemented however, since it's been moved to a new org, I don't have permissions to push anymore, once I get this resolved I'll open a PR.
Our javascript code is setting optional fields to null instead of deleting them. This fails the type checks this project generates.