jodyyangyh / mongo-java-orm

Automatically exported from code.google.com/p/mongo-java-orm
1 stars 0 forks source link

Return WriteResult from MongoDao update/delete #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The MongoDao update/delete operations should probably pass through the 
WriteResult from the underlying Mongo calls:

ie:

    /**
     * {@inheritDoc}
     */
    public void update(
        String collection, DBObject query, DBObject update,
        boolean upsert, boolean multi, WriteConcern concern, DBEncoder encoder) {
        getCollection(collection).update(query, update, upsert, multi, concern, encoder);
    }

should be:

    /**
     * {@inheritDoc}
     */
    public WriteResult update(
        String collection, DBObject query, DBObject update,
        boolean upsert, boolean multi, WriteConcern concern, DBEncoder encoder) {
        return getCollection(collection).update(query, update, upsert, multi, concern, encoder);
    }

Original issue reported on code.google.com by mmast...@gmail.com on 11 Feb 2013 at 3:16