go-kallax icon indicating copy to clipboard operation
go-kallax copied to clipboard

Nested eager load

Open Venommmm opened this issue 7 years ago • 2 comments

Is it possible, for example, to get all the chain: Restaurant - > Reviews - > User? I cant find a way to preload user for each review in this case. (Model scheme: restaurant -> one to many -> reviews; reviews -> one to one (inverse) -> user)

Venommmm avatar Jul 10 '17 12:07 Venommmm

Nope, right now there is no way to do nested eager loading. Your case should be doable with a through, when support for that is added. It's being worked on, but it might still be a while until it's released.

erizocosmico avatar Jul 10 '17 13:07 erizocosmico

curious about this issue as I'm running into a similar need. any updates here from the kallax maintainers?

patrickdevivo avatar Jan 02 '19 22:01 patrickdevivo