[Sqlalchemy-tickets] [sqlalchemy] #2069: eagerload fails if not the whole table is queried
Brought to you by:
zzzeek
From: sqlalchemy <mi...@zz...> - 2011-02-20 12:09:10
|
#2069: eagerload fails if not the whole table is queried --------------------+------------------------------------------------------- Reporter: guest | Owner: zzzeek Type: defect | Status: new Priority: medium | Milestone: 0.6.7 Component: orm | Severity: no triage selected yet Keywords: | Status_field: awaiting triage --------------------+------------------------------------------------------- My Sa version is 0.6.6. Error: {{{ Traceback (most recent call last): File "test.py", line 31, in <module> session().query(Forum.id, Forum.last_post).options(eagerload('last_post')).all() File "/home/florian/.virtualenvs/testing/lib/python2.6/site- packages/sqlalchemy/orm/query.py", line 853, in options return self._options(False, *args) File "<string>", line 1, in <lambda> File "/home/florian/.virtualenvs/testing/lib/python2.6/site- packages/sqlalchemy/orm/query.py", line 52, in generate fn(self, *args[1:], **kw) File "/home/florian/.virtualenvs/testing/lib/python2.6/site- packages/sqlalchemy/orm/query.py", line 870, in _options opt.process_query(self) File "/home/florian/.virtualenvs/testing/lib/python2.6/site- packages/sqlalchemy/orm/interfaces.py", line 760, in process_query self._process(query, True) File "/home/florian/.virtualenvs/testing/lib/python2.6/site- packages/sqlalchemy/orm/interfaces.py", line 766, in _process paths, mappers = self._get_paths(query, raiseerr) File "/home/florian/.virtualenvs/testing/lib/python2.6/site- packages/sqlalchemy/orm/interfaces.py", line 839, in _get_paths path_element = entity.path_entity AttributeError: '_ColumnEntity' object has no attribute 'path_entity' }}} See attached test. -- Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2069> sqlalchemy <http://www.sqlalchemy.org/> The Database Toolkit for Python |