Right Heimdull, thanks.  So my model setup is correct for what I'm
trying to achieve you think?  Any idea why this works:

@first = Entry.find(:first, :include => :category)
@first.category.name

...and this does not?

@entries = Entry.sum(:price, :include => :category, :conditions =>
['user_id = 1'], :group => 'categories.id')

It doesn't seem like my model setup is using the catogory_entries
table successfully as a join table. Thoughts?

-A

On Sep 23, 7:10 pm, heimdull <[EMAIL PROTECTED]> wrote:
> > > Categories doesn't have an entry_id, it doesn't seem to be picking up
> > > entry_category as the join table, though based on its naming, it isn't
> > > a traditional join table otherwise it would be called
> > > category_entry.
>
> With the setup that Andres suggested you need a entry_id in the
> categories table.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to