re: http://dev.rubyonrails.org/ticket/6461
Hi, I'm the author of the patch, or at least the latest one to pick up the mantle... many thanks to Bernado for pointing me to this thread, and for doing the benchmarking. On Jul 13, 1:25 pm, "Steven A Bristol" <[EMAIL PROTECTED]> wrote: > As I understand it, the purpose of the plugin is not to increase > performance, but rather to make it easier and cleaner to do things we are > already doing. Yep, that's pretty much it - I'd put it a bit more strongly, and say that it makes it *possible* to do things in ActiveRecord that could previously only be achieved with workarounds (namely, find_by_sql - which doesn't support eager loading - or massaging the data set in Ruby, which is a method I guess I haven't explored as fully as others here, but just seems intuitively wrong to me when that's just the sort of thing a database is good at). It seems that a few people are still under the impression that this kind of association only comes up in obscure scenarios, but the two real-world use cases from my latest two projects have been "Find all my friends' blog posts" (where Friendship has attributes that necessitate it being a full model, rather than a habtm relationship) and "Find all songs written by a member of this band" - all pretty routine stuff. As far as maturity goes, one of the above projects is in production <http://footprint.wwf.org.uk/> and using the plugin lightly, and the other one - still in the works - uses it extensively (in conjunction with some fairly hefty cascading eager loading), and the 2007-04-28 revision of the patch has Just Worked for me so far. The only issue I encountered was a table aliasing bug which turned out to be an existing Rails bug <http://dev.rubyonrails.org/ticket/8267>, just one that's easier to stumble upon with less twisty relations when you're using this patch... One thing it doesn't do yet is allow you to use a nested hmt association within an :include, which would be a nice addition, but probably be a mostly separate piece of development (and, sadly, will be just as big a patch as the present one, I suspect). One of the unit tests is also failing as of r7119, which I haven't had chance to look into yet, but I'm hoping it's just triggered by the change in the fixture. Cheers for the feedback, everyone - keep me updated about any deficiencies you find, and I'll give them my best shot. - Matt --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
