From f16e83805a8a25d63b1b8eda3cc30648028d3d13 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Wed, 8 Jan 2025 20:13:53 +0100 Subject: [PATCH] moved primary key field processing to bootstrap-app instead of bootstrap-app-base --- generators/bootstrap-application/generator.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/generators/bootstrap-application/generator.ts b/generators/bootstrap-application/generator.ts index ce05ab1aca9..d782e77d2d8 100644 --- a/generators/bootstrap-application/generator.ts +++ b/generators/bootstrap-application/generator.ts @@ -163,6 +163,13 @@ export default class BootstrapApplicationGenerator extends BaseApplicationGenera get postPreparingEachEntity() { return this.asPostPreparingEachEntityTaskGroup({ processEntityPrimaryKeysDerivedProperties({ entity }) { + const primaryKey = entity.primaryKey; + if (!primaryKey || primaryKey.composite || !primaryKey.derived) { + return; + } + const derivedFields = primaryKey.derivedFields; + entity.fields.unshift(...derivedFields); + if (!entity.primaryKey) return; derivedPrimaryKeyProperties(entity.primaryKey); }, @@ -173,14 +180,6 @@ export default class BootstrapApplicationGenerator extends BaseApplicationGenera preparePostEntityServerDerivedProperties(entity); } }, - processDerivedPrimaryKeyFields({ entity }) { - const primaryKey = entity.primaryKey; - if (!primaryKey || primaryKey.composite || !primaryKey.derived) { - return; - } - const derivedFields = primaryKey.derivedFields; - entity.fields.unshift(...derivedFields); - }, }); }