diff --git a/judo-runtime-core-jsl-itest/models/ContainerTestModel/src/test/java/hu/blackbelt/judo/runtime/core/jsl/entity/ContainerTest.java b/judo-runtime-core-jsl-itest/models/ContainerTestModel/src/test/java/hu/blackbelt/judo/runtime/core/jsl/entity/ContainerTest.java
index 3503f352..46877940 100644
--- a/judo-runtime-core-jsl-itest/models/ContainerTestModel/src/test/java/hu/blackbelt/judo/runtime/core/jsl/entity/ContainerTest.java
+++ b/judo-runtime-core-jsl-itest/models/ContainerTestModel/src/test/java/hu/blackbelt/judo/runtime/core/jsl/entity/ContainerTest.java
@@ -31,6 +31,9 @@
import hu.blackbelt.judo.psm.generator.sdk.core.test.api.containertest.containertest.d.D;
import hu.blackbelt.judo.psm.generator.sdk.core.test.api.containertest.containertest.d.DDao;
import hu.blackbelt.judo.psm.generator.sdk.core.test.api.containertest.containertest.d.DForCreate;
+import hu.blackbelt.judo.psm.generator.sdk.core.test.api.containertest.containertest.e.E;
+import hu.blackbelt.judo.psm.generator.sdk.core.test.api.containertest.containertest.e.EDao;
+import hu.blackbelt.judo.psm.generator.sdk.core.test.api.containertest.containertest.e.EForCreate;
import hu.blackbelt.judo.psm.generator.sdk.core.test.guice.ContainerTestDaoModules;
import hu.blackbelt.judo.requirement.report.annotation.Requirement;
import hu.blackbelt.judo.runtime.core.jsl.fixture.JudoRuntimeExtension;
@@ -38,7 +41,7 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
-import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.*;
@Slf4j
public class ContainerTest {
@@ -49,7 +52,8 @@ public class ContainerTest {
@Inject BDao bDao;
@Inject CDao cDao;
@Inject DDao dDao;
-
+ @Inject EDao eDao;
+
@Test
@Requirement(reqs = {
"REQ-ENT-001",
@@ -96,4 +100,67 @@ public void testContainerFunction() {
assertEquals(b1.identifier().getIdentifier(), dB.identifier().getIdentifier());
}
+ @Test
+ @Requirement(reqs = {
+ "REQ-ENT-001",
+ "REQ-ENT-004",
+ "REQ-ENT-005",
+ "REQ-ENT-007",
+ "REQ-ENT-008",
+ "REQ-ENT-012",
+ "REQ-EXPR-001",
+ "REQ-EXPR-003",
+ "REQ-EXPR-004",
+ "REQ-EXPR-006",
+ "REQ-EXPR-021",
+ "REQ-MDL-001",
+ "REQ-MDL-002",
+ "REQ-SYNT-001",
+ "REQ-SYNT-002",
+ "REQ-SYNT-003"
+ })
+ public void testInheritedContainerFunction() {
+
+ E e = eDao.create(EForCreate.builder().withName("E").build());
+
+ B b = bDao.create(BForCreate.builder()
+ .withConA(CForCreate.builder().build())
+ .withDonB(DForCreate.builder().build())
+ .withRelEonB(e)
+ .build()
+ );
+
+ // the container is on the parent, the relation is on the child entity
+ C c = b.getConA();
+
+ assertEquals(e.identifier(), cDao.queryContainerAasBrelEonB(c).get().identifier());
+ // TODO JNG-5103 No value present
+ //assertEquals(e.identifier(), cDao.queryContainerBrelEonB(c).get().identifier());
+
+ // Recursive C relation
+ assertFalse(cDao.queryContainerAasBrelConB(c).isPresent());
+ // TODO JNG-5103 When no relConB relation is attached, the recursive relation contains the c instance.
+ //assertFalse(cDao.queryContainerBrelConB(c).isPresent()); // not work
+
+ C c1 = bDao.createRelConB(b, CForCreate.builder().build());
+ assertEquals(c1.identifier(), cDao.queryContainerAasBrelConB(c).get().identifier());
+ // TODO JNG-5103 Recursive relation contains the c instance always, not the c.container.relConB if it is present
+ //assertEquals(c1.identifier(), cDao.queryContainerBrelConB(c).get().identifier()); // not work
+
+ // the container and the relation are in the same entity
+ D d = b.getDonB();
+
+ assertEquals(e.identifier(), dDao.queryContainerAasBrelEonB(d).get().identifier());
+ assertEquals(e.identifier(), dDao.queryContainerBrelEonB(d).get().identifier());
+
+ // Recursive D relation
+ assertFalse(dDao.queryContainerAasBrelDonB(d).isPresent());
+ assertFalse(dDao.queryContainerBrelDonB(d).isPresent());
+
+ D d1 = bDao.createRelDonB(b, DForCreate.builder().build());
+ assertEquals(d1.identifier(), dDao.queryContainerAasBrelDonB(d).get().identifier());
+ assertEquals(d1.identifier(), dDao.queryContainerBrelDonB(d).get().identifier());
+
+ }
+
}
diff --git a/judo-runtime-core-jsl-itest/models/ContainerTestModel/src/test/java/hu/blackbelt/judo/runtime/core/jsl/transfer/MappedTransferContainerTest.java b/judo-runtime-core-jsl-itest/models/ContainerTestModel/src/test/java/hu/blackbelt/judo/runtime/core/jsl/transfer/MappedTransferContainerTest.java
index 2a9ae9e0..0fb61aa3 100644
--- a/judo-runtime-core-jsl-itest/models/ContainerTestModel/src/test/java/hu/blackbelt/judo/runtime/core/jsl/transfer/MappedTransferContainerTest.java
+++ b/judo-runtime-core-jsl-itest/models/ContainerTestModel/src/test/java/hu/blackbelt/judo/runtime/core/jsl/transfer/MappedTransferContainerTest.java
@@ -29,8 +29,11 @@
import hu.blackbelt.judo.psm.generator.sdk.core.test.api.containertest.containertest.b.BIdentifier;
import hu.blackbelt.judo.psm.generator.sdk.core.test.api.containertest.containertest.c.C;
import hu.blackbelt.judo.psm.generator.sdk.core.test.api.containertest.containertest.c.CDao;
+//import hu.blackbelt.judo.psm.generator.sdk.core.test.api.containertest.containertest.d.D;
+//import hu.blackbelt.judo.psm.generator.sdk.core.test.api.containertest.containertest.d.DDao;
import hu.blackbelt.judo.psm.generator.sdk.core.test.api.containertest.containertest.d.D;
import hu.blackbelt.judo.psm.generator.sdk.core.test.api.containertest.containertest.d.DDao;
+import hu.blackbelt.judo.psm.generator.sdk.core.test.api.containertest.containertest.e.E;
import hu.blackbelt.judo.psm.generator.sdk.core.test.api.containertest.containertest.ta.TA;
import hu.blackbelt.judo.psm.generator.sdk.core.test.api.containertest.containertest.ta.TADao;
import hu.blackbelt.judo.psm.generator.sdk.core.test.api.containertest.containertest.ta.TAForCreate;
@@ -46,6 +49,9 @@
import hu.blackbelt.judo.psm.generator.sdk.core.test.api.containertest.containertest.td.TD;
import hu.blackbelt.judo.psm.generator.sdk.core.test.api.containertest.containertest.td.TDDao;
import hu.blackbelt.judo.psm.generator.sdk.core.test.api.containertest.containertest.td.TDForCreate;
+import hu.blackbelt.judo.psm.generator.sdk.core.test.api.containertest.containertest.te.TE;
+import hu.blackbelt.judo.psm.generator.sdk.core.test.api.containertest.containertest.te.TEDao;
+import hu.blackbelt.judo.psm.generator.sdk.core.test.api.containertest.containertest.te.TEForCreate;
import hu.blackbelt.judo.psm.generator.sdk.core.test.api.containertest.containertest.tpartner.TPartner;
import hu.blackbelt.judo.psm.generator.sdk.core.test.api.containertest.containertest.tpartner.TPartnerDao;
import hu.blackbelt.judo.psm.generator.sdk.core.test.api.containertest.containertest.tpartner.TPartnerForCreate;
@@ -67,6 +73,7 @@
import java.util.List;
import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
@Slf4j
@@ -92,6 +99,9 @@ public class MappedTransferContainerTest {
@Inject
TADao taDao;
+ @Inject
+ TEDao teDao;
+
@Inject
TPartnerDao tpartnerDao;
@@ -249,4 +259,68 @@ public void testTransferContainerFunctionWithRange() {
}
-}
\ No newline at end of file
+
+ @Test
+ @Requirement(reqs = {
+ "REQ-ENT-001",
+ "REQ-ENT-004",
+ "REQ-ENT-005",
+ "REQ-ENT-007",
+ "REQ-ENT-008",
+ "REQ-ENT-012",
+ "REQ-EXPR-001",
+ "REQ-EXPR-003",
+ "REQ-EXPR-004",
+ "REQ-EXPR-006",
+ "REQ-EXPR-021",
+ "REQ-MDL-001",
+ "REQ-MDL-002",
+ "REQ-SYNT-001",
+ "REQ-SYNT-002",
+ "REQ-SYNT-003"
+ })
+ public void testTransferInheritedContainerFunction() {
+
+ TE te = teDao.create(TEForCreate.builder().withName("E").build());
+
+ TB tb = tbDao.create(TBForCreate.builder()
+ .withConA(TCForCreate.builder().build())
+ .withDonB(TDForCreate.builder().build())
+ .withRelEonB(te)
+ .build()
+ );
+
+ // the container is on the parent, the relation is on the child entity
+ TC tc = tb.getConA();
+
+ Assertions.assertEquals(te.identifier(), tcDao.queryContainerAasBrelEonB(tc).get().identifier());
+ // TODO JNG-5103 No value present
+ // assertEquals(te.identifier(), tcDao.queryContainerBrelEonB(tc).get().identifier());
+
+ // Recursive C relation
+ assertFalse(tcDao.queryContainerAasBrelConB(tc).isPresent());
+ // TODO JNG-5103 When no relConB relation is attached, the recursive relation contains the c instance.
+ // assertFalse(tcDao.queryContainerBrelConB(tc).isPresent()); // not work
+
+ TC tc1 = tbDao.createRelConB(tb, TCForCreate.builder().build());
+ Assertions.assertEquals(tc1.identifier(), tcDao.queryContainerAasBrelConB(tc).get().identifier());
+ // TODO JNG-5103 Recursive relation contains the c instance always, not the c.container.relConB if it is present
+ // assertEquals(tc1.identifier(), tcDao.queryContainerBrelConB(tc).get().identifier()); // not work
+
+ // the container and the relation are in the same entity
+ TD td = tb.getDonB();
+
+ Assertions.assertEquals(te.identifier(), tdDao.queryContainerAasBrelEonB(td).get().identifier());
+ Assertions.assertEquals(te.identifier(), tdDao.queryContainerBrelEonB(td).get().identifier());
+
+ // Recursive D relation
+ assertFalse(tdDao.queryContainerAasBrelDonB(td).isPresent());
+ assertFalse(tdDao.queryContainerBrelDonB(td).isPresent());
+
+ TD td1 = tbDao.createRelDonB(tb, TDForCreate.builder().build());
+ Assertions.assertEquals(td1.identifier(), tdDao.queryContainerAasBrelDonB(td).get().identifier());
+ Assertions.assertEquals(td1.identifier(), tdDao.queryContainerBrelDonB(td).get().identifier());
+
+ }
+
+}
diff --git a/judo-runtime-core-jsl-itest/models/ContainerTestModel/src/test/resources/ContainerTest.jsl b/judo-runtime-core-jsl-itest/models/ContainerTestModel/src/test/resources/ContainerTest.jsl
index 16432d3f..aa965e2b 100644
--- a/judo-runtime-core-jsl-itest/models/ContainerTestModel/src/test/resources/ContainerTest.jsl
+++ b/judo-runtime-core-jsl-itest/models/ContainerTestModel/src/test/resources/ContainerTest.jsl
@@ -8,29 +8,61 @@ entity A {
entity B extends A {
field D donB required;
+
+ relation E relEonB;
+ relation C relConB;
+ relation D relDonB;
}
entity C {
relation A containerA <= self.container(type = A);
relation B containerB <= self.container(type = A).asType(type = B);
relation B containerB1 <= self.container(type = B);
+
+ relation E containerAasBrelEonB <= self.container(type = A).asType(type = B).relEonB;
+ relation E containerBrelEonB <= self.container(type = B).relEonB; // JNG-5103 cause problem - no value presented
+
+ relation D containerAasBrelDonB <= self.container(type = A).asType(type = B).relDonB;
+ relation D containerBrelDonB <= self.container(type = B).relDonB; // JNG-5103 cause problem - same C as root returned
+
+ relation C containerAasBrelConB <= self.container(type = A).asType(type = B).relConB;
+ relation C containerBrelConB <= self.container(type = B).relConB;
}
entity D {
relation A containerA <= self.container(type = B).asType(type = A);
relation A containerA1 <= self.container(type = A);
relation B containerB <= self.container(type = B);
+
+ relation E containerAasBrelEonB <= self.container(type = A).asType(type = B).relEonB;
+ relation E containerBrelEonB <= self.container(type = B).relEonB;
+
+ relation D containerAasBrelDonB <= self.container(type = A).asType(type = B).relDonB;
+ relation D containerBrelDonB <= self.container(type = B).relDonB;
+
+}
+
+entity E {
+ field String name;
}
// TRANSFER representation
transfer TA maps A as a {
relation TC conA <= a.conA eager:true required create:true;
+
+ event create `create`;
}
transfer TB maps B as b {
relation TD donB <= b.donB required eager:true create:true;
relation TC conA <= b.conA required eager:true create:true;
+
+ relation TE relEonB <= b.relEonB create:true;
+ relation TC relConB <= b.relConB create:true;
+ relation TD relDonB <= b.relDonB create:true;
+
+ event create `create`;
}
transfer TC maps C as c {
@@ -38,6 +70,11 @@ transfer TC maps C as c {
relation TB containerB <= c.containerB;
relation TB containerB1 <= c.containerB1;
+ relation TE containerAasBrelEonB <= c.containerAasBrelEonB;
+ relation TE containerBrelEonB <= c.containerBrelEonB;
+ relation TC containerAasBrelConB <= c.containerAasBrelConB;
+ relation TC containerBrelConB <= c.containerBrelConB;
+
event create `create`;
}
@@ -46,9 +83,20 @@ transfer TD maps D as d {
relation TA containerA1 <= d.containerA1;
relation TB containerB <= d.containerB;
+ relation TE containerAasBrelEonB <= d.containerAasBrelEonB;
+ relation TE containerBrelEonB <= d.containerBrelEonB;
+ relation TD containerAasBrelDonB <= d.containerAasBrelDonB;
+ relation TD containerBrelDonB <= d.containerBrelDonB;
+
event create `create`;
}
+transfer TE maps E as e {
+ field String name <=> e.name;
+
+ event create `create`;
+}
+
// Transaction model
diff --git a/judo-runtime-core-jsl-itest/models/ForTestingModel/.classpath b/judo-runtime-core-jsl-itest/models/ForTestingModel/.classpath
new file mode 100644
index 00000000..f9e4b34d
--- /dev/null
+++ b/judo-runtime-core-jsl-itest/models/ForTestingModel/.classpath
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/judo-runtime-core-jsl-itest/models/ForTestingModel/.project b/judo-runtime-core-jsl-itest/models/ForTestingModel/.project
new file mode 100644
index 00000000..de101318
--- /dev/null
+++ b/judo-runtime-core-jsl-itest/models/ForTestingModel/.project
@@ -0,0 +1,23 @@
+
+
+ judo-runtime-core-jsl-itest-model-ContainerTestModel
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.m2e.core.maven2Builder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+ org.eclipse.m2e.core.maven2Nature
+
+
diff --git a/judo-runtime-core-jsl-itest/models/ForTestingModel/pom.xml b/judo-runtime-core-jsl-itest/models/ForTestingModel/pom.xml
new file mode 100644
index 00000000..b288fbb3
--- /dev/null
+++ b/judo-runtime-core-jsl-itest/models/ForTestingModel/pom.xml
@@ -0,0 +1,64 @@
+
+ 4.0.0
+
+
+ hu.blackbelt.judo.runtime
+ judo-runtime-core-jsl-itest-model
+ ${revision}
+
+
+ judo-runtime-core-jsl-itest-model-ForTestingModel
+ jar
+
+ JUDO Runtime Core :: JUDO Language Specification DSL Integration Tests :: ForTestingModel
+
+
+
+
+ hu.blackbelt.judo.tatami
+ judo-tatami-jsl-workflow-maven-plugin
+ ${judo-tatami-jsl-version}
+
+
+
+ hu.blackbelt.judo.meta
+ judo-psm-generator-maven-plugin
+ ${judo-meta-psm-version}
+
+
+ execute-psm-test-model-from-artifact-ForTesting
+ generate-test-sources
+
+ generate
+
+
+
+ ${basedir}/target/generated-test-sources/model/ForTestingModel-psm.model
+
+ ${basedir}/target/generated-test-sources/sdk-core/ForTestingModel
+
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+
+
+ add-test-source
+ generate-test-sources
+
+ add-test-source
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/judo-runtime-core-jsl-itest/models/ForTestingModel/src/test/java/hu/blackbelt/judo/runtime/core/jsl/entity/ContainerTest.java b/judo-runtime-core-jsl-itest/models/ForTestingModel/src/test/java/hu/blackbelt/judo/runtime/core/jsl/entity/ContainerTest.java
new file mode 100644
index 00000000..72a1c728
--- /dev/null
+++ b/judo-runtime-core-jsl-itest/models/ForTestingModel/src/test/java/hu/blackbelt/judo/runtime/core/jsl/entity/ContainerTest.java
@@ -0,0 +1,138 @@
+package hu.blackbelt.judo.runtime.core.jsl.entity;
+
+/*-
+ * #%L
+ * JUDO Runtime Core JSL :: Parent
+ * %%
+ * Copyright (C) 2018 - 2022 BlackBelt Technology
+ * %%
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the Eclipse
+ * Public License, v. 2.0 are satisfied: GNU General Public License, version 2
+ * with the GNU Classpath Exception which is
+ * available at https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ * #L%
+ */
+
+import com.google.inject.Inject;
+import hu.blackbelt.judo.psm.generator.sdk.core.test.api.fortestingmodel.fortestingmodel.a.A;
+import hu.blackbelt.judo.psm.generator.sdk.core.test.api.fortestingmodel.fortestingmodel.b.B;
+import hu.blackbelt.judo.psm.generator.sdk.core.test.api.fortestingmodel.fortestingmodel.b.BDao;
+import hu.blackbelt.judo.psm.generator.sdk.core.test.api.fortestingmodel.fortestingmodel.b.BForCreate;
+import hu.blackbelt.judo.psm.generator.sdk.core.test.api.fortestingmodel.fortestingmodel.c.C;
+import hu.blackbelt.judo.psm.generator.sdk.core.test.api.fortestingmodel.fortestingmodel.c.CDao;
+import hu.blackbelt.judo.psm.generator.sdk.core.test.api.fortestingmodel.fortestingmodel.c.CForCreate;
+import hu.blackbelt.judo.psm.generator.sdk.core.test.api.fortestingmodel.fortestingmodel.e.E;
+import hu.blackbelt.judo.psm.generator.sdk.core.test.api.fortestingmodel.fortestingmodel.e.EDao;
+import hu.blackbelt.judo.psm.generator.sdk.core.test.api.fortestingmodel.fortestingmodel.e.EForCreate;
+import hu.blackbelt.judo.psm.generator.sdk.core.test.guice.ForTestingModelDaoModules;
+import hu.blackbelt.judo.requirement.report.annotation.Requirement;
+import hu.blackbelt.judo.runtime.core.jsl.fixture.JudoRuntimeExtension;
+import lombok.extern.slf4j.Slf4j;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+@Slf4j
+public class ContainerTest {
+
+ @RegisterExtension
+ static JudoRuntimeExtension runtimeExtension = new JudoRuntimeExtension("ForTestingModel", new ForTestingModelDaoModules());
+
+ @Inject BDao bDao;
+ @Inject CDao cDao;
+ @Inject EDao eDao;
+
+ @Test
+ @Requirement(reqs = {
+ "REQ-ENT-001",
+ "REQ-ENT-004",
+ "REQ-ENT-005",
+ "REQ-ENT-007",
+ "REQ-ENT-008",
+ "REQ-ENT-012",
+ "REQ-EXPR-001",
+ "REQ-EXPR-003",
+ "REQ-EXPR-004",
+ "REQ-EXPR-006",
+ "REQ-EXPR-021",
+ "REQ-MDL-001",
+ "REQ-MDL-002",
+ "REQ-SYNT-001",
+ "REQ-SYNT-002",
+ "REQ-SYNT-003"
+ })
+ public void testContainerFunction() {
+ B b = bDao.create(BForCreate.builder()
+ .withConA(CForCreate.builder().build())
+ .build());
+ C c = b.getConA();
+
+ A cA = cDao.queryContainerA(c).orElseThrow();
+ B cB = cDao.queryContainerB(c).orElseThrow();
+ B cB1 = cDao.queryContainerB1(c).orElseThrow();
+ assertEquals(b.identifier().getIdentifier(), cA.identifier().getIdentifier());
+ assertEquals(b.identifier().getIdentifier(), cB.identifier().getIdentifier());
+ assertEquals(b.identifier().getIdentifier(), cB1.identifier().getIdentifier());
+
+ B b1 = bDao.create(BForCreate.builder()
+ .withConA(CForCreate.builder().build())
+ .build());
+ }
+
+ @Test
+ @Requirement(reqs = {
+ "REQ-ENT-001",
+ "REQ-ENT-004",
+ "REQ-ENT-005",
+ "REQ-ENT-007",
+ "REQ-ENT-008",
+ "REQ-ENT-012",
+ "REQ-EXPR-001",
+ "REQ-EXPR-003",
+ "REQ-EXPR-004",
+ "REQ-EXPR-006",
+ "REQ-EXPR-021",
+ "REQ-MDL-001",
+ "REQ-MDL-002",
+ "REQ-SYNT-001",
+ "REQ-SYNT-002",
+ "REQ-SYNT-003"
+ })
+ public void testInheritedContainerFunction() {
+
+ E e = eDao.create(EForCreate.builder().withName("E").build());
+
+ B b = bDao.create(BForCreate.builder()
+ .withConA(CForCreate.builder().build())
+ .withRelEonB(e)
+ .build()
+ );
+
+ // the container is on the parent, the relation is on the child entity
+ C c = b.getConA();
+
+ assertEquals(e.identifier(), cDao.queryContainerAasBrelEonB(c).get().identifier());
+ // TODO JNG-5103 No value present
+ //assertEquals(e.identifier(), cDao.queryContainerBrelEonB(c).get().identifier());
+
+ // Recursive C relation
+ assertFalse(cDao.queryContainerAasBrelConB(c).isPresent());
+ // TODO JNG-5103 When no relConB relation is attached, the recursive relation contains the c instance.
+ //assertFalse(cDao.queryContainerBrelConB(c).isPresent()); // not work
+
+ C c1 = bDao.createRelConB(b, CForCreate.builder().build());
+ assertEquals(c1.identifier(), cDao.queryContainerAasBrelConB(c).get().identifier());
+ // TODO JNG-5103 Recursive relation contains the c instance always, not the c.container.relConB if it is present
+ //assertEquals(c1.identifier(), cDao.queryContainerBrelConB(c).get().identifier()); // not work
+
+ }
+
+}
diff --git a/judo-runtime-core-jsl-itest/models/ForTestingModel/src/test/java/logback.xml b/judo-runtime-core-jsl-itest/models/ForTestingModel/src/test/java/logback.xml
new file mode 100644
index 00000000..151d55dc
--- /dev/null
+++ b/judo-runtime-core-jsl-itest/models/ForTestingModel/src/test/java/logback.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+ %d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n
+
+
+
+
+
+
+
+
+
diff --git a/judo-runtime-core-jsl-itest/models/ForTestingModel/src/test/resources/ForTestingModel.jsl b/judo-runtime-core-jsl-itest/models/ForTestingModel/src/test/resources/ForTestingModel.jsl
new file mode 100644
index 00000000..b02d04ac
--- /dev/null
+++ b/judo-runtime-core-jsl-itest/models/ForTestingModel/src/test/resources/ForTestingModel.jsl
@@ -0,0 +1,29 @@
+model ForTestingModel;
+
+type string String min-size:0 max-size:255;
+
+entity A {
+ field required C conA;
+}
+
+entity B extends A {
+
+ relation E relEonB;
+ relation C relConB;
+}
+
+entity C {
+ relation A containerA <= self.container(entityType = A);
+ relation B containerB <= self.container(entityType = A).asType(entityType = B);
+ relation B containerB1 <= self.container(entityType = B);
+
+ relation E containerAasBrelEonB <= self.container(entityType = A).asType(entityType = B).relEonB;
+ relation E containerBrelEonB <= self.container(entityType = B).relEonB; // JNG-5103 cause problem - no value presented
+
+ relation C containerAasBrelConB <= self.container(entityType = A).asType(entityType = B).relConB;
+ relation C containerBrelConB <= self.container(entityType = B).relConB; // JNG-5103 cause problem - same C as root returned
+}
+entity E {
+ field String name;
+}
+
diff --git a/judo-runtime-core-jsl-itest/models/RelationCreateWithAttachmentTestModel/pom.xml b/judo-runtime-core-jsl-itest/models/RelationCreateWithAttachmentTestModel/pom.xml
index 0516c248..3eeb3b0d 100644
--- a/judo-runtime-core-jsl-itest/models/RelationCreateWithAttachmentTestModel/pom.xml
+++ b/judo-runtime-core-jsl-itest/models/RelationCreateWithAttachmentTestModel/pom.xml
@@ -7,10 +7,10 @@
${revision}
- judo-runtime-core-jsl-itest-model-RelationCreationWithAttachmentTestModel
+ judo-runtime-core-jsl-itest-model-RelationCreateWithAttachmentTestModel
jar
- JUDO Runtime Core :: JUDO Language Specification DSL Integration Tests :: RelationCreationWithAttachmentTestModel
+ JUDO Runtime Core :: JUDO Language Specification DSL Integration Tests :: RelationCreateWithAttachmentTestModel
diff --git a/judo-runtime-core-jsl-itest/models/pom.xml b/judo-runtime-core-jsl-itest/models/pom.xml
index f9346836..ea4144ae 100644
--- a/judo-runtime-core-jsl-itest/models/pom.xml
+++ b/judo-runtime-core-jsl-itest/models/pom.xml
@@ -42,6 +42,7 @@
TransferConstructorModel
RecursiveCompositionModel
RelationCreateWithAttachmentTestModel
+ ForTestingModel
OptimisticLockModel
TransferRangeModel
FilterCountModel
diff --git a/pom.xml b/pom.xml
index 97b4bd55..7ed78d67 100644
--- a/pom.xml
+++ b/pom.xml
@@ -41,7 +41,7 @@
1.1.4.20241016_041551_184f05f2_develop
- 1.0.6.20241015_125315_84fed0cc_develop
+ 1.0.6.20241020_080540_b0e1572a_feature_JNG_5103_JoinFactory_fails_with_relations_of_subtypes
1.0.0.20240926_085934_a795815f_develop
1.3.0.20240924_131124_116febb4_develop