From: Mike Bayer Date: Sat, 16 Jul 2005 00:44:53 +0000 (+0000) Subject: (no commit message) X-Git-Tag: rel_0_1_0~890 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47baf7360560eea4f89616f1fe2104bf6bf8ea5d;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git --- diff --git a/lib/sqlalchemy/sql.py b/lib/sqlalchemy/sql.py index 5a5a922256..2d9d26e951 100644 --- a/lib/sqlalchemy/sql.py +++ b/lib/sqlalchemy/sql.py @@ -270,11 +270,10 @@ class Join(Selectable): self.left = left self.right = right self.id = self.left.id + "_" + self.right.id - if allcols: self.columns = [c for c in self.left.columns] + [c for c in self.right.columns] else: - self.columns = [c for c in self.right.columns] + self.columns = [c for c in self.right.columns] # TODO: if no onclause, do NATURAL JOIN self.onclause = onclause diff --git a/test/select.py b/test/select.py index 796806c9cd..6bdf43167f 100644 --- a/test/select.py +++ b/test/select.py @@ -195,7 +195,7 @@ FROM mytable, myothertable WHERE foo.id = foofoo(lala) AND datetime(foo) = Today ), "SELECT t.myid, t.name, t.description, foo.f FROM mytable t, (select f from bar where lala=heyhey) foo WHERE foo.f = t.id") - def testjoin(self): + def testjoin(self): self.runtest( join(self.table2, self.table, self.table.c.id == self.table2.c.id).select(), "SELECT myothertable.otherid, myothertable.othername, mytable.myid, mytable.name, mytable.description \