Synonym properties break when added through add_property

Issue #888 resolved
Former user created an issue

(original reporter: ged) Synonym properties added through add_property throw an exception when setting the attribute. I get the following traceback for the attached script. It might be related to ticket #831 (though I don't think it is).

Traceback (most recent call last):
  File "test_synonym_sa.py", line 32, in <module>
    f1.email = "x@y.com"
  File "/home/ged/devel/sqlalchemy/trunk/lib/sqlalchemy/orm/attributes.py", line 91, in __set__
    return self.user_prop.__set__(instance, value)
  File "/home/ged/devel/sqlalchemy/trunk/lib/sqlalchemy/orm/mapper.py", line 560, in __getattribute__
    return object.__getattribute__(self, key)
AttributeError: '_CompileOnAttr' object has no attribute '__set__'

Comments (8)

  1. Former user Account Deleted

    (original author: ged) Doesn't work so nicely in fact. Here is an updated test case which shows that the (python) property is in fact not used.

  2. Former user Account Deleted

    (original author: ged) The correct test case is test_synonym_sa.py. There was a bug in .2.py.

  3. Log in to comment