I just found example myself:
e.g.
composer=db.person.with_alias('composer')
arranger=db.person.with_alias('arranger')
left=[composer.on(composer.id==db.work.composer),arranger.on
(arranger.id==db.work.arranger)]
recs=db().select(db.work.title,composer.name,arranger.name,left=left)
On 15 čnc, 09:15, David Marko <[email protected]> wrote:
> How can I create a query with more that one outer join using 'left' ?
> I would like to create query that has 2 left outer join statements.
> How to do it?
>
> e.g. This is what I would like to do, but using 'left' twice is not
> possible ...
> db(db.reply.id>0).select(db.reply.ALL, db.auth_user.ALL,.db.task.ALL,
> left=db.auth_user.on(db.auth_user.id==db.reply.created_by),
> left=db.task.on(db.task.id==db.reply.task))
>
> Thank you,
> David