Re: [mongodb-user] Same _id in different collections?

23 views
Skip to first unread message

Sam Millman

unread,
Sep 24, 2012, 3:19:13 AM9/24/12
to mongod...@googlegroups.com
You probably easily get away with it, there is nothing, upon insert that prevents you from doing this. Especially sice these documents are designed to have duplicate _ids I doubt you will run into any problems.

On 24 September 2012 07:41, Alex <unkne...@gmail.com> wrote:
is possible to use the same _id for two documents in two different collections? could be problematic in some way?

--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com
To unsubscribe from this group, send email to
mongodb-user...@googlegroups.com
See also the IRC channel -- freenode.net#mongodb

David Hows

unread,
Sep 24, 2012, 3:25:58 AM9/24/12
to mongod...@googlegroups.com
Hi Alex,

Please have a look over the documentation. ObjectID's are unique per collection from the Mongo side of things there is no reason this should cause an issue. http://api.mongodb.org/wiki/current/Object%20IDs.html

Cheers,

David
Reply all
Reply to author
Forward
0 new messages