Sven Fuchs pointed me to this thread: http://www.ruby-forum.com/topic/108163
Which illustrates a bug in Mephisto due to confusion over the semantics. In particular, Sven says: (Of course I'm not after particulary blaming somebody personally, but ...) As far as I can see, this is an example where even a member of the Rails core team mistakenly assumed that in: > Article.find(:all, :include => :tags, :conditions => ['tags.name IN (?)', tag_names]) > ... this would return articles that have tags with certain names associated (i.e. condition applied), but all of them pre-populated with *all* tags (i.e. condition not applied). In fact this bug is still present in Mephisto (or at least the version Josh Susser is running). I think the thread illustrates a bit more impartially how this functionality can be confusing and limiting. Sven doesn't get why AR works this way, while I argue that it's the only reasonable for it to work. The result that it provides is not intuitive, so the user has to fully understand the behind-the-scenes JOINs anyway. Why not force them to write out the JOINs for their conditions manually? It still requires the same level of understanding, but at least it's more transparent. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
