According to the book, I should be able to append 'join' statements to a list. Here is what happens:
>>> joinlist = []
>>> joinlist.append( db.res.on(db.extra_dates.res_id == db.res.id) )
>>> joinlist.append( db.prop.on(db.res.prop_id == db.prop.id) )
>>> db()._select(db.prop.id, join=joinlist )
'SELECT prop.id FROM extra_dates CROSS JOIN prop JOIN res ON (extra_dates.res_id = res.id) JOIN prop ON (res.prop_id = prop.id) ORDER BY prop.id;'This SQL is wrong and creates a ticket because an unwanted 'CROSS JOIN' has been added. In my case I am using Firebird, but I believe this is irrelevant because it happens in base.py which probably affects all DBs.
I'm posting this initially here because the
same problem was posted a couple of years ago.
Maybe there's a workaround, or I'm missing something?