--- a/app/soc/logic/models/base.py Tue Mar 03 19:27:55 2009 +0000
+++ b/app/soc/logic/models/base.py Tue Mar 03 19:50:11 2009 +0000
@@ -411,6 +411,28 @@
# entity has been deleted call _onDelete
self._onDelete(entity)
+ def getAll(self, query):
+ """Retrieves all entities for the specified query.
+ """
+
+ chunk = 999
+ offset = 0
+ result = []
+ more = True
+
+ while(more):
+ data = query.fetch(chunk+1, offset)
+
+ more = len(data) > chunk
+
+ if more:
+ del data[chunk]
+
+ result.extend(data)
+ offset = offset + chunk
+
+ return result
+
def _createField(self, entity_properties, name):
"""Hook called when a field is created.