web2py: Version 1.92.1 (2011-02-16 15:04:40)

with_alias fails to work when where clause is specified. It works fine when 
documented example is run

>>> db()._select(db.person.name, Father.name, Mother.name, 
left=(Father.on(Father.id==db.person.father_id), 
Mother.on(Mother.id==db.person.mother_id)))

'SELECT  person.name, father.name, mother.name FROM person LEFT JOIN person 
AS father ON (father.id = person.father_id) LEFT JOIN person AS mother ON 
(mother.id = person.mother_id);'

but it fails where I specify a where clause

>>> db((db.person.father_id == Father.id))._select(db.person.name, 
Father.name)

SELECT  person.name, father.name FROM person, father WHERE (person.father_id 
= father.id);

in second case, alias is not created. Read in a thread that with_alias 
currently supports left outer join only. Any plan to extend its usage?

Reply via email to