From 9ef4566caec43aadad36e0befce8732ee85480b8 Mon Sep 17 00:00:00 2001 From: Gabriel Adrian Samfira Date: Wed, 27 Aug 2025 09:14:45 +0000 Subject: [PATCH] Preload more info for entity pools Signed-off-by: Gabriel Adrian Samfira --- database/sql/pools.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/database/sql/pools.go b/database/sql/pools.go index 265388f2..e86087ad 100644 --- a/database/sql/pools.go +++ b/database/sql/pools.go @@ -343,7 +343,17 @@ func (s *sqlDatabase) CreateEntityPool(ctx context.Context, entity params.ForgeE } func (s *sqlDatabase) GetEntityPool(_ context.Context, entity params.ForgeEntity, poolID string) (params.Pool, error) { - pool, err := s.getEntityPool(s.conn, entity.EntityType, entity.ID, poolID, "Tags", "Instances") + preloadList := []string{ + "Tags", + "Instances", + "Enterprise", + "Enterprise.Endpoint", + "Organization", + "Organization.Endpoint", + "Repository", + "Repository.Endpoint", + } + pool, err := s.getEntityPool(s.conn, entity.EntityType, entity.ID, poolID, preloadList...) if err != nil { return params.Pool{}, fmt.Errorf("fetching pool: %w", err) }