From 18c94943cb25f0263c81263c34e9d88ef11a2cbe Mon Sep 17 00:00:00 2001 From: Darin Kelkhoff Date: Thu, 27 Jun 2024 11:52:51 -0500 Subject: [PATCH] Enrich apps before tables - fixed a situation where a table's possible-value field wasn't getting set up as LINK adornment, due to table not being put in app's child-list, which enrichment does, so, if we enrich app first, it fixed it --- .../core/instances/QInstanceEnricher.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/instances/QInstanceEnricher.java b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/instances/QInstanceEnricher.java index a87713e5..0e101379 100644 --- a/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/instances/QInstanceEnricher.java +++ b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/instances/QInstanceEnricher.java @@ -123,6 +123,18 @@ public class QInstanceEnricher *******************************************************************************/ public void enrich() { + ///////////////////////////////////////////////////////////////////////////////////////// + // at one point, we did apps later - but - it was possible to put tables in an app's // + // sections, but not its children list (enrichApp fixes this by adding such tables to // + // the children list) so then when enrichTable runs, it looks for fields that are // + // possible-values pointed at tables, for adding LINK adornments - and that could // + // cause such links to be omitted, mysteriously! so, do app enrichment before tables. // + ///////////////////////////////////////////////////////////////////////////////////////// + if(qInstance.getApps() != null) + { + qInstance.getApps().values().forEach(this::enrichApp); + } + if(qInstance.getTables() != null) { qInstance.getTables().values().forEach(this::enrichTable); @@ -139,11 +151,6 @@ public class QInstanceEnricher qInstance.getBackends().values().forEach(this::enrichBackend); } - if(qInstance.getApps() != null) - { - qInstance.getApps().values().forEach(this::enrichApp); - } - if(qInstance.getReports() != null) { qInstance.getReports().values().forEach(this::enrichReport);