Fix aggregates

This commit is contained in:
Konsta Vesterinen
2014-01-04 03:00:44 +02:00
parent f4a261a4ac
commit 9f6f1f98d1

View File

@@ -368,10 +368,7 @@ class AggregatedValue(object):
[remote],
from_obj=[from_]
).where(
local.in_(
getattr(obj, remote.key)
for obj in objects
)
self.local_condition(property_, objects)
)
)
)
@@ -379,6 +376,16 @@ class AggregatedValue(object):
return query
def local_condition(self, prop, objects):
return prop.local_remote_pairs[0][0].in_(
getattr(
obj,
prop.local_remote_pairs[0][1].key
)
for obj in objects
)
class AggregationManager(object):
def __init__(self):
self.reset()