From 0646adc54ef290609a4e7efa305d2dec2f1438af Mon Sep 17 00:00:00 2001 From: liamfallon Date: Wed, 11 Sep 2019 23:01:59 +0100 Subject: Fix derivedFrom field TOSCA does not have a version on derivedFrom fields on policies and policy types. THerefore, we use the default value of 0.0.0 for versions on these fields in the database. When reading back out derivedFrom fields, we need to just take the name of the field and not the ID of the field. Issue-ID: POLICY-2075 Change-Id: I55e9c479047d6c1a9376a1713f4ddb2536476b29 Signed-off-by: liamfallon --- .../onap/policy/models/tosca/simple/concepts/JpaToscaEntityType.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'models-tosca') diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaEntityType.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaEntityType.java index 506add346..4823efc01 100644 --- a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaEntityType.java +++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaEntityType.java @@ -122,7 +122,7 @@ public class JpaToscaEntityType extends PfConcept impleme toscaEntity.setVersion(getKey().getVersion()); if (derivedFrom != null) { - toscaEntity.setDerivedFrom(derivedFrom.getId()); + toscaEntity.setDerivedFrom(derivedFrom.getName()); } if (description != null) { -- cgit 1.2.3-korg