Details
-
Improvement
-
Resolution: Duplicate
-
Major - P3
-
None
-
None
-
n/a
*Location*: http://docs.mongodb.org/ecosystem/use-cases/category-hierarchy/
*User-Agent*: Mozilla/5.0 (X11; CrOS armv7l 4731.81.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.62 Safari/537.36
*Referrer*: http://stackoverflow.com/questions/20601631/some-questions-on-mongodb-category-hierarchy-use-case
*Screen Resolution*: 1366 x 768
*repo*: docs-ecosystem
*source*: use-cases/category-hierarchy
n/a *Location*: http://docs.mongodb.org/ecosystem/use-cases/category-hierarchy/ *User-Agent*: Mozilla/5.0 (X11; CrOS armv7l 4731.81.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.62 Safari/537.36 *Referrer*: http://stackoverflow.com/questions/20601631/some-questions-on-mongodb-category-hierarchy-use-case *Screen Resolution*: 1366 x 768 *repo*: docs-ecosystem *source*: use-cases/category-hierarchy
Description
Code example is incorrect at:
for cat in db.categories.find(
{'ancestors._id': bop_id},
{'parent_id': 1}):
build_ancestors_full(cat['_id'], cat['parent_id'])
Should be:
for cat in db.categories.find(
{'ancestors._id': bop_id},
{'parent': 1}):
build_ancestors_full(cat['_id'], cat['parent'])
parent_id is not used as a document key anywhere else in this code sample.
Attachments
Issue Links
- duplicates
-
DOCS-2416 Typo in "Category Heirarchy" page
-
- Closed
-