Re: PGError: ERROR: missing FROM-clause entry for table

Поиск
Список
Период
Сортировка
От James B. Byrne
Тема Re: PGError: ERROR: missing FROM-clause entry for table
Дата
Msg-id 60401.70.50.88.137.1290741220.squirrel@webmail.harte-lyne.ca
обсуждение исходный текст
Ответ на Re: PGError: ERROR: missing FROM-clause entry for table  (Robert Treat <rob@xzilla.net>)
Список pgsql-general
On Thu, November 25, 2010 21:58, Robert Treat wrote:
> On Thu, Nov 25, 2010 at 9:21 PM, James B. Byrne
> <byrnejb@harte-lyne.ca>wrote:

>>
>
> Looks to me like the problem is you are trying to ORDER BY columns
> in
> "ca_customs_entry", but there is no such table for that (don't
> confuse it
> with "ca_customs_entries").  You need to either set a matching
> alias, or fix
> the table name qualifier in those order by columns.

That was exactly the problem.  Thank you very much.  I am afraid
that the mental gymnastics that Rails requires--table names are
plural, corresponding model classes are singular--often trips me up.
 I would never have seen that error on my own.


--
***          E-Mail is NOT a SECURE channel          ***
James B. Byrne                mailto:ByrneJB@Harte-Lyne.ca
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3


В списке pgsql-general по дате отправления:

Предыдущее
От: Robert Treat
Дата:
Сообщение: Re: PGError: ERROR: missing FROM-clause entry for table
Следующее
От: A B
Дата:
Сообщение: Question about catching exception