On 2012-09-10, at 8:02 AM, Josh Susser wrote:

> The issue is that a polymorphic association requires that you query the db to 
> determine the class of the model, and you need that information to know what 
> table to query to get the record you want. Some SQL dbs provide some kind of 
> recursive query that might be able to do what you want in one query, but it 
> would be pretty complicated and I can't guess how difficult it would be to 
> manage the performance of those queries.

Actually, since we are only storing the model name in the DB, it simply cannot 
be done at all, as the model name might be different from the table name.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" 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-core?hl=en.

Reply via email to