Hello, i’m trying to preload nested associations.
So i’m trying to get a customer’s orders. So my query looks like
query =
from c in Customer,
where: c.id == ^id,
preload: [:orders]
Then later, i attach remarks to every order and want to display remarks in every order, so my updated query looks like this now.
. . .
. . .
preload: [orders: :remarks]
But my problem now is, i also want to query the admins who made the remarks in orders. Yes, this remarks table has a field that references to admins table. But looking at my code now for preloading remarks, how can i possibly preload also the admins within the remarks?
Any idea or suggestion? tia