|
@@ -75,7 +75,7 @@ class MongoDbDatasource(object):
|
75
|
75
|
#@warning multiple UID broken by this method
|
76
|
76
|
#@return an integer
|
77
|
77
|
def new_numeric_id(self, emcomp):
|
78
|
|
- target = emcomp #.uid_source()
|
|
78
|
+ target = emcomp.uid_source()
|
79
|
79
|
tuid = target._uid[0] # Multiple UID broken here
|
80
|
80
|
results = self.select(
|
81
|
81
|
target, field_list = [tuid], filters = [],
|
|
@@ -104,6 +104,7 @@ class MongoDbDatasource(object):
|
104
|
104
|
results = self.__act_on_abstract(target, filters,
|
105
|
105
|
relational_filters, self.select, field_list = field_list,
|
106
|
106
|
order = order, group = group, limit = limit)
|
|
107
|
+
|
107
|
108
|
#Here we may implement the group
|
108
|
109
|
#If sorted query we have to sort again
|
109
|
110
|
if order is not None:
|
|
@@ -115,7 +116,7 @@ class MongoDbDatasource(object):
|
115
|
116
|
results = list()
|
116
|
117
|
else:
|
117
|
118
|
if limit is not None:
|
118
|
|
- if limit + offset >= len(results):
|
|
119
|
+ if limit + offset > len(results):
|
119
|
120
|
limit = len(results)-offset-1
|
120
|
121
|
results = results[offset:offset+limit]
|
121
|
122
|
return results
|