Re: [SQLObject] Problem with LEFTJOINOn
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Oleg B. <ph...@ph...> - 2007-08-03 16:34:25
|
On Fri, Aug 03, 2007 at 10:55:06AM -0500, Jim Steil wrote: > Thanks for the response. I do understand all of that, but in the doc > (http://www.sqlobject.org/SQLObject.html#left-join-and-other-joins), it > gives the following example: > > MyTable.select( > join=LEFTJOINOn(None, Table1, > MyTable.q.name == Table1.q.value)) > > will return the following sql statement > > SELECT * FROM my_table > LEFT JOIN table2 ON my_table.name = table1.value; > > I assumed the * was meant as all columns. No, it only means "all columns from MyTable". This has to be mentioned in the docs. The only way in SQLObject to select columns from multiple tables is sqlbuilder.Select(). Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |