From 99ccd6f8639bd028303ab4b7f9efd74ccc80f8a1 Mon Sep 17 00:00:00 2001 From: Lennart Heinrich Date: Fri, 17 Oct 2025 19:02:07 +0200 Subject: [PATCH] fix jpa model for links --- TelosysTools/telosys-tools.cfg | 2 +- .../infinimotion/persistence/persistence_entity_java.vm | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/TelosysTools/telosys-tools.cfg b/TelosysTools/telosys-tools.cfg index 200dc66..bd9ce03 100644 --- a/TelosysTools/telosys-tools.cfg +++ b/TelosysTools/telosys-tools.cfg @@ -22,7 +22,7 @@ ENTITY_PKG=de.infinimotion.bean ProjectVariable.MAVEN_ARTIFACT_ID=model ProjectVariable.MAVEN_GROUP_ID=de.infinimotion ProjectVariable.PROJECT_NAME=infinimodel -ProjectVariable.PROJECT_VERSION=0.0.3 +ProjectVariable.PROJECT_VERSION=0.0.6 ProjectVariable.REST_SERVER_PORT=3000 ProjectVariable.REST_API_ROOT=/api/v1 ProjectVariable.REST_URL_ROOT=http://localhost:3000 diff --git a/TelosysTools/templates/infinimotion/persistence/persistence_entity_java.vm b/TelosysTools/templates/infinimotion/persistence/persistence_entity_java.vm index 6af12ac..d854ccb 100644 --- a/TelosysTools/templates/infinimotion/persistence/persistence_entity_java.vm +++ b/TelosysTools/templates/infinimotion/persistence/persistence_entity_java.vm @@ -115,6 +115,13 @@ $jpa.linkAnnotations(4, $link, $entity.attributes) #foreach( $link in $entity.selectedLinks ) public ${link.formattedFieldType(0)} ${link.getter}() { return this.${link.formattedFieldName(0)}; + } + +#end + //--- SETTERS FOR LINKS +#foreach( $link in $entity.selectedLinks ) + public void ${link.setter}( ${link.formattedFieldType(0)} $link.fieldName ) { + this.$link.fieldName = $link.fieldName ; } #end