zzzeek / test_sqlalchemy

0 stars 0 forks source link

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

Closed sqlalchemy-bot closed 10 years ago

sqlalchemy-bot commented 16 years ago

Issue created by Anonymous


FROM maintestbad1 ORDER BY maintestbad1.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 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'


Attachments: defer-problem.py

sqlalchemy-bot commented 16 years ago

Anonymous wrote:


demonstrates error that occurs when defer group is used in a class with a field that has a synonym

sqlalchemy-bot commented 16 years ago

Anonymous wrote:


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 I'll buy you a beer at pycon instead.)

-jeff hinrichs

sqlalchemy-bot commented 16 years ago

Anonymous wrote:


(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.

sqlalchemy-bot commented 16 years ago

Anonymous wrote:


(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.