fdb-document-layer
fdb-document-layer copied to clipboard
Keep $elemMatch behavior consistent with MongoDB
Document Layer allows $elemMatch
to work against nonarray fields, whereas MongoDB allows only on array fields. Array operators semantics are quite confusing already. Although allowing $elemMatch
on nonarray fields allows a few extra cases, it's leading to confusing semantics. Also, its possible to represent those extra queries with cleared, arguably longer queries.
This issue is to change the behavior back to supporting the operator only for array fields.
Although this is a backward incompatible change, I think we should go for it as this is a bit consistent for different queries especially when we use it together with None
.