Anyone know of an elegant way in ActiveRecord to create a relation that
pulls in all *but* one or two fields?  We're dealing with a database
that's not in our control, and they're scattering blob fields into 
tables.  We do queries that pull in lots of records from these tables,
and having the big blob data transferring all the time when we don't
usually need it seems wasteful.

I'd like something effectively like:

class Parent < ActiveRecord::Base

  has_many :children,
           :do_not_load => 'big_data_field'

I can explicitly name every field except the one by using :select, but

  a) there are a ton of fields
  b) that's asking for trouble whenever the remote database adds
     or deletes a field

Have I missed another option to has_many, or maybe some other technique?

Thanks...

        -glenn



--~--~---------~--~----~------------~-------~--~----~
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
-~----------~----~----~----~------~----~------~--~---

Reply via email to