File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -326,8 +326,8 @@ Nested Statements
326326You can chain or nest ``Select`` and ``SelectMany`` statements to unwind nested
327327arrays. Consider a collection that contains documents with a **new** schema. These
328328documents contain a ``restaurants`` field, which holds an array of documents
329- that each represent the ``Restaurant`` class. The documents within the array each have
330- a ``grades`` field that holds an array of documents that each represent
329+ represented by the ``Restaurant`` class. The documents within the array each have
330+ a ``grades`` field that holds an array of documents represented by
331331the ``Grade`` class. The following code is an example of a single document in
332332this collection:
333333
@@ -350,16 +350,21 @@ this collection:
350350 "date" : ISODate("2013-01-17T00:00:00Z"),
351351 "grade" : "A",
352352 "score" : 13.0
353- },
354- ...
353+ }
355354 ]
356355 ...
357356 },
358357 {
359358 "_id": { ... } ,
360359 "address": { ... },
361360 "name": "Harriet's Kitchen",
362- "grades": [ ... ],
361+ "grades": [
362+ {
363+ "date" : ISODate("2014-04-19T00:00:00Z"),
364+ "grade" : "B",
365+ "score" : 12.0
366+ }
367+ ],
363368 ...
364369 },
365370 ...
@@ -393,9 +398,10 @@ Each array holds all grade objects from all restaurants in each document.
393398 "grade" : "A",
394399 "score" : 13.0
395400 },
396- { "date" : ISODate("..."),
397- "grade" : ...,
398- "score" : ...
401+ {
402+ "date" : ISODate("2014-04-19T00:00:00Z"),
403+ "grade" : "B",
404+ "score" : 12.0
399405 },
400406 ...
401407 ],
You can’t perform that action at this time.
0 commit comments