[Sqlalchemy-tickets] Issue #3137: Certain subqueries broken since 0.9.4 (zzzeek/sqlalchemy)
Brought to you by:
zzzeek
|
From: thiefmaster <iss...@bi...> - 2014-07-24 11:45:02
|
New issue 3137: Certain subqueries broken since 0.9.4 https://bitbucket.org/zzzeek/sqlalchemy/issue/3137/certain-subqueries-broken-since-094 thiefmaster: The following query is causing an error inside the SQLAlchemy code since 0.9.4: ``` subquery = (select(['latitude']) .select_from(func.unnest(func.array_agg(Room.latitude)) .alias('latitude')).limit(1).as_scalar()) Room.query.with_entities(Room.building, subquery).group_by(Room.building).all() ``` Partial traceback: ``` File ".../sqlalchemy/sql/selectable.py", line 429, in columns self._populate_column_collection() File ".../sqlalchemy/sql/selectable.py", line 992, in _populate_column_collection for col in self.element.columns._all_columns: AttributeError: 'list' object has no attribute '_all_columns' ``` Related SO question with more details: http://stackoverflow.com/questions/24930155/strange-error-after-sqlalchemy-update-list-object-has-no-attribute-all-colu |