Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Looking for comments on a rails patch, lazy association instantiation

Reply
Thread Tools

Looking for comments on a rails patch, lazy association instantiation

 
 
Rick DeNatale
Guest
Posts: n/a
 
      10-24-2007
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/

 
Reply With Quote
 
 
 
 
Rick DeNatale
Guest
Posts: n/a
 
      10-24-2007
Sorry I intended this to go to the rails-talk list but gmail outsmarted me.

On 10/24/07, Rick DeNatale <(E-Mail Removed)> 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/

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
lazy evaluation is sometimes too lazy... help please. Ken Pu Python 3 01-16-2009 11:23 AM
Re: lazy evaluation is sometimes too lazy... help please. Boris Borcic Python 0 01-16-2009 10:46 AM
Re: lazy evaluation is sometimes too lazy... help please. Boris Borcic Python 0 01-16-2009 10:37 AM
hello! first post to clr. I'm asking about an attempt at a lazy rubysolution to computing fibonacci numbers for a project euler problem. seems tobe a bug in lazy ruby... tphyahoo Ruby 6 08-08-2008 08:15 PM
How to do a singleton pattern with lazy instantiation? Damon C++ 4 01-24-2004 10:52 AM



Advertisments