mongoid/mongoid-site — Issue #102: relations/referenced/1-n
Author: humanshell
Created: 2012-01-05 09:02:18+00:00
State: open

I just have a quick question/observation that might need to be fixed on the mongoid.org site.

On the page about 1 to many referenced relations, under the Storage heading,

http://mongoid.org/docs/relations/referenced/1-n.html

it says this:

```
# The parent person document.
{ "_id" : ObjectId("4d3ed089fb60ab534684b7e9") }

# The child post document.
{
"_id" : ObjectId("4d3ed089fb60ab534684b7e9"),
"person_id" : ObjectId("4d3ed089fb60ab534684b7f1")
}
```

I'm still new to Mongoid and MongoDB but I think I have a decent grasp on database relations and foreign keys (I have been known to be wrong from time to time though). Shouldn't the child's "person_id" be the same as the parent's "_id"?

On the site now the parent "_id" and child "_id" are the same. This just doesn't make sense to me.

Anyway, I just thought that if it needs to be adjusted you'd like to know about it.

Lovin' mongoid and mongo!