|
@@ -215,15 +215,16 @@ class MongoDbDatasource(object):
|
215
|
215
|
mongo_filters = self.__process_filters(
|
216
|
216
|
target, filters, relational_filters)
|
217
|
217
|
res = self.__collection(target).update(mongo_filters, upd_datas)
|
218
|
|
-
|
219
|
|
- return 1 #res.modified_count()
|
|
218
|
+ logger.warning(mongo_filters)
|
|
219
|
+ logger.warning(upd_datas)
|
|
220
|
+ logger.warning(res)
|
|
221
|
+ return res['n']
|
220
|
222
|
|
221
|
223
|
## @brief Inserts a record in a given collection
|
222
|
224
|
# @param target Emclass : class of the object to insert
|
223
|
225
|
# @param new_datas dict : datas to insert
|
224
|
226
|
# @return the inserted uid
|
225
|
227
|
def insert(self, target, new_datas):
|
226
|
|
- new_datas['lodel_id'] = self.new_numeric_id(target)
|
227
|
228
|
res = self.__collection(target).insert(new_datas)
|
228
|
229
|
return str(res)
|
229
|
230
|
|