-
Type:
New Feature
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Aggregation Framework, Write Ops
-
None
-
Query Optimization
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
In pipeline update specification it is common to check if a field doesn't exist and the way to tell if you're doing an upsert would be to check if _id doesn't exist. I'm proposing a shorthand syntax expression $onInsert or ifUpsert (exact work TBD) which would be short for:
{$eq:[ {$type:"$_id"}, "missing" ] }