Em Monday 03 December 2007 13:56:07 lolostar escreveu:
> Hi,
>
> I try to use a foreign key and a multiple join in my model but as my
> fkey column is named ''agence' in my model, it is created as
> 'agence_id' in my database and, here's the problem, whenever I call
> 'AgenceEDF.get(1).photos()' for example, the sql generated uses the
> 'agence' name :
>
> ProgrammingError: column "agence" does not exist
> LINE 1: SELECT id FROM agences.photo WHERE agence = (1)

Why not declaring the correct name on your model?

>  Here's my model :
>
> class AgenceEDF(SQLObject):
(...)

>     photos = MultipleJoin('Photo',joinColumn='agence')

Why don't you use the correct name of "agence_id"?

> Any idea ?

Check the docs and use the correct name on the MultipleJoin.

-- 
Jorge Godoy      <[EMAIL PROTECTED]>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to