Kind of off topic but the reason it has to be plural is that's how the
table is named.  It passes the order value to create the sql query.
Normally if you don't join another table you don't need to specify the
table name.

On May 27, 3:06 pm, Montgomery Kosma <[email protected]> wrote:
> I have Collection object which belongs_to Custodian.  I'd like my
> Collections to be grouped or ordered by custodian.name.
>
> In vanilla rails, this works:
>
> Collection.all(:include => :custodian, :order => "custodians.name")
>
> Absent the :include option, I get an "unknown column
> custodians.name"  (not sure why custodians has to be plural ...).
>
> I get the same error in Hobo if I my Collection class specifies:
>
> set_default_order "custodians.name"
>
> I think the fix is to add the :include option to the default find
> behavior.  Any way in Hobo to do that?  If not, should there be?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo 
Users" 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/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to