Re: [sqlalchemy] Joining queries with column concatenation.

2011-06-20 Thread Michael Bayer
On Jun 20, 2011, at 10:16 AM, Michael Bayer wrote: > > On Jun 19, 2011, at 6:16 PM, Filip Zyzniewski - Tefnet wrote: > >> Hi, >> >> another day and another challenge :). >> >> Somehow SQLAlchemy has a problem determining what to join when using >> concatenation of columns. >> >> this: sessi

Re: [sqlalchemy] Joining queries with column concatenation.

2011-06-20 Thread Michael Bayer
On Jun 19, 2011, at 6:16 PM, Filip Zyzniewski - Tefnet wrote: > Hi, > > another day and another challenge :). > > Somehow SQLAlchemy has a problem determining what to join when using > concatenation of columns. > > this: session.query(Locality.name, Street.name).join(Street.locality) > proper

[sqlalchemy] Joining queries with column concatenation.

2011-06-19 Thread Filip Zyzniewski - Tefnet
Hi, another day and another challenge :). Somehow SQLAlchemy has a problem determining what to join when using concatenation of columns. this: session.query(Locality.name, Street.name).join(Street.locality) properly joins: FROM street JOIN locality ON street."localityId" = locality."Id" but th