I has several model objects that flow down like a tree:
Class1 has_many Class2
Class2 has_many Class3
and so on.
when are the child records actually created?
If I do:
c1 = Class1.find(:all)
are the child objects (C2s below) created then or not until i do
something like:
c2s = c1.C2s while iterating through the c1s?
If the form, that’s cool, no problem, but If I’ve got say 1000 recs in
each of the tables corresponding to the has many relationship, that
could be quite a problem, right? And I’m aware I can append columns to
an object to prevent it, but I may not want to do it that way. When I
actually do something like c2 = c1.C2s, I will want of that attributes
of those child objects. So my question is is there a way to prevent
the relationship when you want to, even if it’s defined in the class?
thanks!
rb