MongoDB :: are Mongo IDs unique across collections?

The uniqueness constraint for _id is per collection, so yes – one and the same ID can occur once per Collection.

It’s however very unlikely, if not impossible, for the same ID to be generated twice. So in order for this to happen you would have to manually insert duplicate IDs.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)