summaryrefslogtreecommitdiffstats
path: root/aai-core/src/main
diff options
context:
space:
mode:
authorKajur, Harish (vk250x) <vk250x@att.com>2019-04-07 20:38:42 -0400
committerKajur, Harish (vk250x) <vk250x@att.com>2019-04-07 20:38:42 -0400
commit10cf022c9394ba4409d601012eaf6619c0302d55 (patch)
tree198da91d236508dff419f50e1e5b44ad650a6c15 /aai-core/src/main
parent08c1bd4d78a0504e7531876869a7ae0cd9c448df (diff)
Fix logic in Schema Generator to properly
check if indexes are needed on dbaliased properties Added test to verify indexes are created. Issue-ID: AAI-2333 Change-Id: Ib80de5cce3dfc99277d7cbd6e1a51530ff588478 Signed-off-by: Kajur, Harish (vk250x) <vk250x@att.com>
Diffstat (limited to 'aai-core/src/main')
-rw-r--r--aai-core/src/main/java/org/onap/aai/dbgen/SchemaGenerator.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/aai-core/src/main/java/org/onap/aai/dbgen/SchemaGenerator.java b/aai-core/src/main/java/org/onap/aai/dbgen/SchemaGenerator.java
index e6eb1bca..c0a9e201 100644
--- a/aai-core/src/main/java/org/onap/aai/dbgen/SchemaGenerator.java
+++ b/aai-core/src/main/java/org/onap/aai/dbgen/SchemaGenerator.java
@@ -163,8 +163,8 @@ public class SchemaGenerator {
String dmsg = " Index [" + dbPropName + "] already existed in the DB. ";
LOGGER.debug(dmsg);
} else {
- if (obj.getIndexedProperties().contains(dbPropName)) {
- if (obj.getUniqueProperties().contains(dbPropName)) {
+ if (obj.getIndexedProperties().contains(propName)) {
+ if (obj.getUniqueProperties().contains(propName)) {
imsg = "Add Unique index for PropertyKey: [" + dbPropName + "]";
LOGGER.info(imsg);
graphMgmt.buildIndex(dbPropName, Vertex.class).addKey(propK).unique()