diff options
author | liamfallon <liam.fallon@est.tech> | 2019-09-11 23:01:59 +0100 |
---|---|---|
committer | Pamela Dragosh <pdragosh@research.att.com> | 2019-09-12 13:30:22 +0000 |
commit | e5e1d7bb85165db224c77afb2eed6af3d515c22e (patch) | |
tree | a08172f0321217dec6fd4cdd273ed195e6d38288 | |
parent | e9acb37dcc8fc4e49f05599a0065355ec8f3c75e (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>
(cherry picked from commit 0646adc54ef290609a4e7efa305d2dec2f1438af)
-rw-r--r-- | models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaEntityType.java | 2 |
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) { |