Forum: Ruby on Rails Has_many association

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
D12eb3135791d642b4bc46b9d04dc034?d=identicon&s=25 Rails junkie (Guest)
on 2007-01-30 02:27
(Received via mailing list)
Hello All,
newbie but I have one question:
If I have a Model 'parent' and it contains has_many associations to 5
Now once parent object is loaded, all the other has_many associated
model also get retrieved which slows down the 'parent' model load.
What do you recommend this in these kinds of scenario?
Should disabling has_many option is the only way?
Can we avoid this? what would be the best way?
C4dc94c893471878a105761a9207f29b?d=identicon&s=25 Zack Chandler (Guest)
on 2007-01-30 02:36
(Received via mailing list)
On 1/29/07, Rails junkie <> wrote:
> Thanks
Auto-loading associations does not happen by default.  So unless you
are using the :include directive you should be fine.  Use
./script/console and development.log to verify what is happening.

Hope this helps.

Zack Chandler
D12eb3135791d642b4bc46b9d04dc034?d=identicon&s=25 Rails junkie (Guest)
on 2007-01-30 02:38
(Received via mailing list)
Great. Will post the findings.
Appreciate the response
This topic is locked and can not be replied to.