BSONDocument `isEmpty` gives false for empty document
gagandeepkalra opened this issue · 0 comments
gagandeepkalra commented
Expected Behavior
Please describe the expected behavior of the issue, starting from the first action.
- BSONDocument from an optional element producer,
BSONDocument("foo" -> None)
.isEmpty
on such document should give true.elements
should give empty sequence
Actual Behavior
.isEmpty
gives false.elements
gives empty sequence
For the given document constructor, ElementProducer
could be the empty version.
def apply(elms: ElementProducer*): BSONDocument
Then isEmpty
computation based on elms.isEmpty
yields wrong result