this looks like:

http://www.sqlalchemy.org/trac/wiki/FAQ#ImusinglazyFalsetocreateaJOINOUTERJOINandSQLAlchemyisnotconstructingthequerywhenItrytoaddaWHEREORDERBYLIMITetc.whichreliesupontheOUTERJOIN




On May 21, 2010, at 9:56 AM, jose soares wrote:

> Hi all,
> 
> I'm trying to use joinedload('specie') in a query but it makes an unexpected 
> alias of table name to 'specie_1' and it conflict with passed orderby column 
> "specie.descrizione", as in:
> 
> 
> ProgrammingError: ('(ProgrammingError) invalid reference to FROM-clause entry 
> for table "specie"\nLINE 2: ..._1 ON specie_1.codice = razza.cod_specie ORDER 
> BY specie.des...\n ^\nHINT: Perhaps you meant to reference the table alias 
> "specie_1".\n', <bound method Controller.index of 
> <sicer.BASE.controller.tabelleCodifica.razza.Controller object at 
> 0x72cc1d0>>) 'SELECT razza.codice AS razza_codice, razza.descrizione AS 
> razza_descrizione, razza.cod_specie AS razza_cod_specie, specie_1.codice AS 
> specie_1_codice, specie_1.descrizione AS specie_1_descrizione, 
> specie_1.cod_gruppo_specie AS specie_1_cod_gruppo_specie, 
> specie_1.categoria_prodotto AS specie_1_categoria_prodotto \nFROM razza LEFT 
> OUTER JOIN specie AS specie_1 ON specie_1.codice = razza.cod_specie ORDER BY 
> specie.descrizione ASC, razza.descrizione ASC \n LIMIT 12 OFFSET 0' {}
> 
> Is there a way to tell joinedload to not make the alias or a way to pass it 
> the alias name?
> 
> thank you.
> 
> j
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/sqlalchemy?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to