Tags: lazar-push/gorm-gen
Tags
Fix: nested relationship preload on cache hit Cache was previously used to just prevent infinite recursion if a relationship type was already processed. This would prevent preloading of a type if it was previously encountered, even for indirect relationships. Direct relationship example (tags excluded for brevity): type A struct { ID int A []A AB []AB } type B struct { ID int AB []AB } type AB struct { A A B B } Valid: query.A.A.AB.B Invalid: query.A.AB.B --> query.A.A has already "consumed" the child relationships Instead, use cache for memoization and store previously computed values, so that it can be reused.