summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2018-10-16 15:39:51 +0000
committerGerrit Code Review <gerrit@onap.org>2018-10-16 15:39:51 +0000
commitfad730f39c435c2282c02371294eea37573de6b3 (patch)
treeaef7b2533ff892df6eeee47c857a55e78ce7170c
parenta4354f9871bad4a4e9bbd398f2fbcf1aec959998 (diff)
parent7b06f9211f7900e09ab6b97f61205b96aef693c1 (diff)
Merge "Naming micro-service code - sql issues."0.3.1
-rw-r--r--ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/persistence/repository/GeneratedNameRespository.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/persistence/repository/GeneratedNameRespository.java b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/persistence/repository/GeneratedNameRespository.java
index ed2ac531..cb98b5dd 100644
--- a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/persistence/repository/GeneratedNameRespository.java
+++ b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/persistence/repository/GeneratedNameRespository.java
@@ -44,7 +44,7 @@ public interface GeneratedNameRespository extends CrudRepository<GeneratedName,
/*
* Finds entities for a given external system ID and element type, ignoring any special characters in names.
*/
- @Query(value = "select * from Generated_Name g where g.external_Id=:externalId and "
+ @Query(value = "select * from GENERATED_NAME g where g.external_Id=:externalId and "
+ "REPLACE(REPLACE(REPLACE(element_type,'NAME',''),'-',''),'_','')=:elementType",
nativeQuery = true)
public GeneratedName findByExternalIdAndRelaxedElementType(@Param("externalId")String externalId,