|
@@ -184,6 +184,11 @@ ordering is not implemented yet")
|
184
|
184
|
#@param relational_filters list : List of relational filters
|
185
|
185
|
#@return int : number of deleted records
|
186
|
186
|
def delete(self, target, filters, relational_filters):
|
|
187
|
+ if target.is_asbtract():
|
|
188
|
+ #Deletion with abstract LeObject as target (reccursiv calls)
|
|
189
|
+ return self.__act_on_abstract(target, filters,
|
|
190
|
+ relational_filters, self.delete)
|
|
191
|
+ #Non abstract beahavior
|
187
|
192
|
mongo_filters = self.__process_filters(
|
188
|
193
|
target, filters, relational_filters)
|
189
|
194
|
res = self.__collection(target).delete_many(mongo_filters)
|
|
@@ -196,6 +201,11 @@ ordering is not implemented yet")
|
196
|
201
|
#@param upd_datas dict : datas to update (new values)
|
197
|
202
|
#@return int : Number of updated records
|
198
|
203
|
def update(self, target, filters, relational_filters, upd_datas):
|
|
204
|
+ if target.is_asbtract():
|
|
205
|
+ #Update using abstract LeObject as target (reccursiv calls)
|
|
206
|
+ return self.__act_on_abstract(target, filters,
|
|
207
|
+ relational_filters, self.update, upd_datas = upd_datas)
|
|
208
|
+ #Non abstract beahavior
|
199
|
209
|
mongo_filters = self.__process_filters(
|
200
|
210
|
target, filters, relational_filters)
|
201
|
211
|
res = self.__collection(target).update_many(mongo_filters, upd_datas)
|