[DOCS-2417] Comment on: "ecosystem/use-cases/category-hierarchy.txt" Created: 16/Dec/13  Updated: 03/Nov/17  Resolved: 20/Dec/13

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Improvement Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Sam Kleinman (Inactive)
Resolution: Duplicate Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

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


Issue Links:
Duplicate
duplicates DOCS-2416 Typo in "Category Heirarchy" page Closed
Participants:
Days since reply: 10 years, 9 weeks, 3 days ago

 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.


Generated at Thu Feb 08 07:43:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.