- changed status to resolved
enhancements for PropComparator adaption vs. AliasedClass, etc.
Issue #2756
resolved
in descriptor_props.py:
@util.memoized_property
def _comparable_elements(self):
if self.adapter:
# we need to do a little fudging here because
# the adapter function we're given only accepts
# ColumnElements, but our prop._comparable_elements is returning
# InstrumentedAttribute, because we support the use case
# of composites that refer to relationships. The better
# solution here is to open up how AliasedClass interacts
# with PropComparators so more context is available.
return [ for x in self.prop._comparable_elements](self.adapter(x.__clause_element__())
)
else:
return self.prop._comparable_elements
determine if we can change the signature of PropComparator.adapted
to expect a more contextual object. Would need to see who calls this method besides AliasedClass
, might produce some backwards-incompatible behavior.
Comments (2)
-
reporter -
reporter - removed milestone
Removing milestone: 0.9.0 (automated comment)
- Log in to comment
7f82168cb6b0f0e22d387f