cant call Class.propname.property on a Synonym

Issue #965 resolved
Mike Bayer repo owner created an issue

raises an error:

Traceback (most recent call last):
  File "test.py", line 97, in <module>
    Values.a_1._comparator = AComparator(Values.a_1.property) #class_mapper(Values).get_property('a_1'))
  File "/Users/classic/dev/sqlalchemy/lib/sqlalchemy/orm/mapper.py", line 572, in __getattribute__
    return getattr(getattr(cls, clskey), key)
  File "/Users/classic/dev/sqlalchemy/lib/sqlalchemy/orm/attributes.py", line 66, in _property
    return class_mapper(self.impl.class_).get_property(self.impl.key)
AttributeError: 'ProxyImpl' object has no attribute 'class_'

Comments (3)

  1. Mike Bayer reporter

    this works as of release 0.5.0 since proxied_attribute_factory.Proxy routes __getattr__() to the PropComparator after the user-defined descriptor.

  2. Log in to comment