Skip to content

Commit 6cdf720

Browse files
authored
Merge pull request #457 from xargom/DOCSP-48691
DOCSP-48691 -- Changed code example...
2 parents f552ade + 7e219ab commit 6cdf720

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

source/reference/known-issues.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,10 @@ the field ``$type`` is ``array`` with the ``createView`` method.
9292

9393
.. code-block:: javascript
9494

95-
db.createView('nonullsched', '"nextDeparture"', [{'$match': {'response.schedule': {'$type': 'array'}}}])
95+
db.createView("nextDeparture_view", "nextDeparture", [
96+
{
97+
"$project": {
98+
"response": { "$cond": { "if": { "$eq": ["$response.schedule", null] },
99+
"then": { }, "else": "$response" } }, "name": 1
100+
}
101+
} ])

0 commit comments

Comments
 (0)