I have a batch of records (BasicDBObject[] records) to insert into a mongo (2.4.9, actually TokuMX 1.4.1) collection using the Java API (2.12.0). When a DuplicateKeyException occurs, how do I determine which batch/array member caused the dupkey error? Is there an element in the exception that describes or details the batch/array member?
When a DuplicateKeyException occurs, how can I tell if any of the batch members succeed? I'd really just like to tell mongo to ignore duplicates and process the entire batch, but it's not obvious how to do so.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/ea9525f9-a556-42b0-84ab-1664e446b7d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CAE_jbCKTB5F8R3qJm%2BMVdzq9YzjqMaOOVJEG6x%3D_k%3D5TFbBDcg%40mail.gmail.com.