AttributeError: 'SynonymProperty' object has no attribute 'strategy'

Issue #982 resolved
Former user created an issue

FROM main___testbad1 ORDER BY __main___testbad1.oid2008-02-27 08:26:32,990 INFO sqlalchemy.engine.base.Engine.0x..2c [(most recent call last): File "/home/jlh/Projects/delasco/RoadShow2/defer-problem.py", line 68, in <module> print r.custname,r.address1,r.note File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.4.3-py2.5.egg/sqlalchemy/orm/attributes.py", line 44, in __get return self.impl.get(instance.state) File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.4.3-py2.5.egg/sqlalchemy/orm/attributes.py", line 225, in get value = callable() File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.4.3-py2.5.egg/sqlalchemy/orm/strategies.py", line 183, in call toload = p.key for p in localparent.iterate_properties if isinstance(p.strategy, DeferredColumnLoader) and p.group==strategy.group AttributeError: 'SynonymProperty' object has no attribute 'strategy'

Comments (4)

  1. Former user Account Deleted

    Better description: If a field of a class has a synonym and the class also has a group of deferred columns, trying to access the deferred group results in an error complaining that the SynonymProperty has no attribute 'strategy'

    Sorry that I used elixir to demonstrate, but I am new to SQLAlchemy and it appears in the SA part of the code and not the elixir layer. (Please don't whip me if I'm wrong<g> I'll buy you a beer at pycon instead.)

    -jeff hinrichs

  2. Former user Account Deleted
    • assigned issue to

    (original author: ged) I'll look into this to see if the problem is ELixir-specific or not, and will produce an SQLAlchemy-only test case if it's not.

  3. Former user Account Deleted

    (original author: ged) My tests seem to show it's really an Elixir issue since I can't seem to reproduce the problem with an SA-only code. Closing here for now.

  4. Log in to comment