Do all related models load along with it's parent?


#1

In my scenario I have a flyer model that has an image associated with it that is a DataURL representation of an image.

The problem is when there are a lot of flyers to load, those images take up a lot of time because they can potentially be pretty large.

What I want to do is move those images to a different model, since in my index route when I list all flyers I don’t actually need the image, only when you view a single flyer should the image be loaded and displayed.

If I set the image to belong to a flyer, will the image still be loaded on the index route when I do a generic find all flyers or does it only get loaded if I ask for the image to be displayed?