Browse Source

Bugfix on the recursive select

Roland Haroutiounian 8 years ago
parent
commit
8e4815c34f
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      plugins/mongodb_datasource/datasource.py

+ 3
- 2
plugins/mongodb_datasource/datasource.py View File

90
     #@param instanciate bool : If true, the records are returned as instances, else they are returned as dict
90
     #@param instanciate bool : If true, the records are returned as instances, else they are returned as dict
91
     #@return list
91
     #@return list
92
     #@todo Implement the relations
92
     #@todo Implement the relations
93
-    def select(self, target, field_list, filters = None, rel_filters=None, order=None, group=None, limit=None, offset=0):
93
+    def select(self, target, field_list, filters = None, rel_filters=None, order=None, group=None, limit=None,
94
+               offset=0):
94
         results = list()
95
         results = list()
95
         if target.abstract:
96
         if target.abstract:
96
             target_childs = target.child_classes()
97
             target_childs = target.child_classes()
97
             for target_child in target_childs:
98
             for target_child in target_childs:
98
-                results.append(self.select(target=target, field_list=field_list, filters=filters,
99
+                results.append(self.select(target=target_child, field_list=field_list, filters=filters,
99
                                            rel_filters=rel_filters, order=order, group=group, limit=limit,
100
                                            rel_filters=rel_filters, order=order, group=group, limit=limit,
100
                                            offset=offset))
101
                                            offset=offset))
101
         else:
102
         else:

Loading…
Cancel
Save