[JAVA-209] add writeconcernt to collection.insert() Created: 04/Nov/10  Updated: 22/Dec/10  Resolved: 13/Nov/10

Status: Closed
Project: Java Driver
Component/s: Cluster Management
Affects Version/s: 2.3
Fix Version/s: 2.4

Type: New Feature Priority: Major - P3
Reporter: Joseph Wang Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related

 Description   

Re: [mongodb-user] Java 2.3 Driver Questions for Replication Set
...
From:
Eliot Horowitz <eliothorowitz@gmail.com>
...
Add to Contacts
To: mongodb-user@googlegroups.com

>
> a) Is there a plan to add WriteConcern parameter to collection.insert(list)?

It should be there. Can you add a jira?



 Comments   
Comment by auto [ 13/Nov/10 ]

Author:

{'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: added WriteConcern to insert( List ) JAVA-209
/mongodb/mongo-java-driver/commit/fd732069b7b3397da7d5004fcbbe1ed1087d2a42

Comment by Joseph Wang [ 05/Nov/10 ]

Scott's proposed workaround is acceptable. This is a nice to have feature, but not a required change for 2.4. Thank you.

Comment by Scott Hernandez (Inactive) [ 04/Nov/10 ]

You can use the array version of insert in the mean time. All the list version does is this:

public WriteResult insert(List<DBObject> list)
throws MongoException

{ return insert( list.toArray( new DBObject[list.size()] ) , getWriteConcern() ); }
Generated at Thu Feb 08 08:51:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.