It depends on your application needs. Do you want to load all associated
data each time, even if you don't need it? Or do you want to do more of a
lazy load, where you retrieve associated data on demand? I vote for the
lazy load approach that would return a collection of active records of the
associated type for performance reasons. Or you could also do a selective
approach where most associations are loaded lazily and others that are
frequently accessed with the parent record are retrieved with the parent.
Good luck.
Thanks,
Sam

Signature
_______________________________
Sam Santiago
ssantiago@n0spam-SoftiTechture.com
http://www.SoftiTechture.com
_______________________________
> Hi,
>
[quoted text clipped - 7 lines]
>
> Jason
Jason - 20 Oct 2004 08:17 GMT
Hi Sam,
I have used fowlers ghost lazy load pattern in another project that used a
domain model with DataMappers rather than ActiveRecords. In that project, we
used lazy load everywhere and this worked well. However, this only seems to
be compatible with data mappers and no examples are provided for
implementing lazy load when using an ActiveRecord model.
My current way of lazy loading is to expose methods on each ActiveRecord
that retrieve the associated data...is that what you meant by lazy loading
or did you have some other method?
Thanks,
Jason
> It depends on your application needs. Do you want to load all associated
> data each time, even if you don't need it? Or do you want to do more of a
[quoted text clipped - 22 lines]
>>
>> Jason
Sam Santiago - 20 Oct 2004 16:04 GMT
Yes, that's what I had been thinking. Good luck.
Thanks,
Sam

Signature
_______________________________
Sam Santiago
ssantiago@n0spam-SoftiTechture.com
http://www.SoftiTechture.com
_______________________________
> Hi Sam,
>
[quoted text clipped - 38 lines]
> >>
> >> Jason