-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Major - P3
-
Affects Version/s: 5.0.0
-
Component/s: None
-
None
It would be great to be able to specify a foreign reference as as value other than null. False would be fine, but the option to set it when defining the relation would also work.
Why?
When you want to query on a foreign reference for null, i.e. give me all of these documents that DONT have a relation set, you have to query against null or $exists: false. This doesn't perform too great in a lot of circumstances. Being able to query against false (or anything other than null) would solve this.
Related to: https://jira.mongodb.org/browse/SERVER-18653