I have an ERM similar to this:
-------- -------- --------
|ModelA|-----|ModelB|-----|ModelC|
-------- -------- --------
I get ModelA and its ModelBs with the following:
modela = Repo.get(ModelA,1)
modela = preload(modela, :modelb)
Now I can access ModelBusing modela.modelb. But how can I preload ModelC? When I print my model A, it says that modelc is not loaded.
source
share