Python: How do I provide my own ObjectID / _id when I insert into a MongoDB? -


i'm inserting information regarding files mongodb, among other things checksum file. want use checksum _id document. how do that?

you set _id field explicitly on document storing. example:

document = {} document['_id'] = my_id 

please note _id value has unique every document. store checksum _id if know unique.


Comments

Popular posts from this blog

rdbms - what exactly the undo information lives in oracle? -

bash - How do you programmatically add a bats test? -

java - Getting exception in JDBC thin driver -