On 16 May 2012 10:51, Annet <anneve...@googlemail.com> wrote:

> I tried:
>
> row=db().select(db.Organization.name,db.Hub.name,\
> left=[db.Node.on(db.Node.id==db.Organization.nodeID),db.Node.on(db.Node.id
> ==db.Hub.nodeID)]).first()
>
> but that results in:
>
> <class 'psycopg2.ProgrammingError'> invalid reference to FROM-clause entry
> for table "organization" LINE 1: ...OM Organization, Hub LEFT JOIN Node ON
> (Node.id = Organizati... ^ HINT: There is an entry for table
> "organization", but it cannot be referenced from this part of the query.


I have seen this in Postgresql and normally solve it by putting (in the
select part) the table referenced last so I would try

rows = db().select(db.Hub.name, db.Organization_name)...

Regards
Johann


-- 
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)

Reply via email to