Looking for comments on a rails patch, lazy association instantiation

Discussion in 'Ruby' started by Rick DeNatale, Oct 24, 2007.

  1. Prompted by some discussion on rails-talk last week, I worked up a
    patch to add an option to ActiveRecord::Base#find which allows
    associations to be :included for purposes of the where clause, but
    defers instantiating the included association objects.

    The use case is where there are a large number of association rows
    returned by the query, the vast majority will not be used since they
    are only being used to select a small set of root objects.

    Here's the ticket with the patch:
    http://dev.rubyonrails.org/ticket/9923

    --
    Rick DeNatale

    My blog on Ruby
    http://talklikeaduck.denhaven2.com/
    Rick DeNatale, Oct 24, 2007
    #1
    1. Advertising

  2. Sorry I intended this to go to the rails-talk list but gmail outsmarted me.

    On 10/24/07, Rick DeNatale <> wrote:
    > Prompted by some discussion on rails-talk last week, I worked up a
    > patch to add an option to ActiveRecord::Base#find which allows
    > associations to be :included for purposes of the where clause, but
    > defers instantiating the included association objects.
    >
    > The use case is where there are a large number of association rows
    > returned by the query, the vast majority will not be used since they
    > are only being used to select a small set of root objects.
    >
    > Here's the ticket with the patch:
    > http://dev.rubyonrails.org/ticket/9923
    >
    > --
    > Rick DeNatale
    >
    > My blog on Ruby
    > http://talklikeaduck.denhaven2.com/
    >
    >



    --
    Rick DeNatale

    My blog on Ruby
    http://talklikeaduck.denhaven2.com/
    Rick DeNatale, Oct 25, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Damon
    Replies:
    4
    Views:
    537
    Martijn Lievaart
    Jan 24, 2004
  2. Replies:
    1
    Views:
    562
    Salt_Peter
    Dec 25, 2006
  3. Ken Pu
    Replies:
    3
    Views:
    664
    Steven D'Aprano
    Jan 16, 2009
  4. Boris Borcic
    Replies:
    0
    Views:
    542
    Boris Borcic
    Jan 16, 2009
  5. Boris Borcic
    Replies:
    0
    Views:
    539
    Boris Borcic
    Jan 16, 2009
Loading...

Share This Page