I having problems trying to create a query with two
left joins as only one allows having the left table
specified, the rest have to be None, otherwise it
generates invalid SQL.
The theory is that if you don't specify the left table,
it joins agains the first table defined. In this case
you don't need a comma before the left join.
But if you want to define both tables (the recommended
procedure), you need a leading comma.
As it is now, you cannot mix them:
if tables and join.table1:
join_str = ", "
join_str = ' '
join_str += " ".join([self.sqlrepr(j) for j
As I propose, every joind is treated individually:
join_str = ""
for j in join:
if tables and j.table1:
sep = ", "
sep = ' '
join_str += sep + self.sqlrepr(j)
I attach the patch. I posted it in the mailing lisrt
without any reposnse.
Log in to post a comment.