[Sqlalchemy-tickets] Issue #4314: sqlalchemy.sql.select with multiple joins creates wrong SQL code
Brought to you by:
zzzeek
From: Winfried P. <iss...@bi...> - 2018-08-05 20:48:15
|
New issue 4314: sqlalchemy.sql.select with multiple joins creates wrong SQL code https://bitbucket.org/zzzeek/sqlalchemy/issues/4314/sqlalchemysqlselect-with-multiple-joins Winfried Plappert: sqlalchemy.__version__ is 1.2.10. I am using basic SQLAlchemy, not the ORM. I want to select from two memory-attached databases in SQLite. As soon as I join the second database to the query, the generated SQL spits out some erroneous information, as show in the attached example. The abbreviated error message is sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) ambiguous column name: source.md256.id. The table relationship: "fileinfo" contains a list of filenames in the filesystem, here in the example in the current directory, together with modification time (mtime), inode number, filesize, and a link () to the other table "md256", which contains the sha256 of that file. The second database in the example is an exact copy of the first database. The are supposed to be linked via the md256.sha256 values. The addditional index tables for "fileinfo" are not relevant here. |