Add preliminary m2m support for aggregates
This commit is contained in:
@@ -432,6 +432,15 @@ class AggregatedValue(object):
|
|||||||
return from_
|
return from_
|
||||||
|
|
||||||
def local_condition(self, prop, objects):
|
def local_condition(self, prop, objects):
|
||||||
|
if prop.secondary is not None:
|
||||||
|
return prop.local_remote_pairs[1][0].in_(
|
||||||
|
getattr(
|
||||||
|
obj,
|
||||||
|
prop.local_remote_pairs[1][0].key
|
||||||
|
)
|
||||||
|
for obj in objects
|
||||||
|
)
|
||||||
|
else:
|
||||||
return prop.local_remote_pairs[0][0].in_(
|
return prop.local_remote_pairs[0][0].in_(
|
||||||
getattr(
|
getattr(
|
||||||
obj,
|
obj,
|
||||||
|
Reference in New Issue
Block a user