[Sqlalchemy-tickets] [sqlalchemy] #2756: enhancements for PropComparator adaption vs. AliasedClass,
Brought to you by:
zzzeek
|
From: sqlalchemy <mi...@zz...> - 2013-06-10 17:36:27
|
#2756: enhancements for PropComparator adaption vs. AliasedClass, etc.
--------------------+------------------------------------
Reporter: zzzeek | Owner: zzzeek
Type: task | Status: new
Priority: high | Milestone: 0.9.0
Component: orm | Severity: major - 1-3 hours
Keywords: | Progress State: in queue
--------------------+------------------------------------
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 [self.adapter(x.__clause_element__())
for x in self.prop._comparable_elements]
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.
See also #2755, #2754.
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2756>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|