[Sqlalchemy-tickets] Issue #3318: dictinct(Model) generates unexpected query (zzzeek/sqlalchemy)
Brought to you by:
zzzeek
|
From: __tosh <iss...@bi...> - 2015-03-11 12:05:02
|
New issue 3318: dictinct(Model) generates unexpected query https://bitbucket.org/zzzeek/sqlalchemy/issue/3318/dictinct-model-generates-unexpected-query __tosh: Hi there, I use SQLAlchemy 0.8.3 (so maybe it's fixed in newer releases) with MySQL 5.1.73. When I do the query ``` #!python Session.query(distinct(Model)) ``` it generates something like ``` #!SQL SELECT DISTINCT :param_1 AS anon_1; ``` Where :param_1 is replaced with Model.\_\_repr\_\_() which is a simple string. Maybe it would be more obvious if such SQLAlchemy-queries generated the following code? ``` #!SQL SELECT DISTINCT * AS anon_1 FROM model_table; ``` |