aboutsummaryrefslogtreecommitdiffstats
path: root/models-tosca/src
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2019-09-11 23:01:59 +0100
committerliamfallon <liam.fallon@est.tech>2019-09-11 23:02:06 +0100
commit0646adc54ef290609a4e7efa305d2dec2f1438af (patch)
tree0e5265cc01f2a9d659debde7234aa75bad7d6b06 /models-tosca/src
parent962cfed13c00005f84282434b09d9073163e2dd2 (diff)
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 <liam.fallon@est.tech>
Diffstat (limited to 'models-tosca/src')
-rw-r--r--models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaEntityType.java2
1 files changed, 1 insertions, 1 deletions
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<T extends ToscaEntity> extends PfConcept impleme
toscaEntity.setVersion(getKey().getVersion());
if (derivedFrom != null) {
- toscaEntity.setDerivedFrom(derivedFrom.getId());
+ toscaEntity.setDerivedFrom(derivedFrom.getName());
}
if (description != null) {