diff app/query.service.ts @ 40:896ae7eefb33

fix relation type queries.
author casties
date Mon, 15 Feb 2016 11:10:08 +0100
parents 7578b21cdf2e
children 5353b2dffb0f
line wrap: on
line diff
--- a/app/query.service.ts	Sun Feb 14 19:40:07 2016 +0100
+++ b/app/query.service.ts	Mon Feb 15 11:10:08 2016 +0100
@@ -151,10 +151,10 @@
                 nIdx += 1;
                 let rel = params.relationType;
                 if (rel.isOutgoing()) {
-                    queryMatch += `-[:\`${rel.getName()}\`]->(n${nIdx})`;
+                    queryMatch += `-[:\`${rel.getRelType()}\`]->(n${nIdx})`;
                 } else {
                     // inverse relation
-                    queryMatch += `<-[:\`${rel.getName()}\`]-(n${nIdx})`;
+                    queryMatch += `<-[:\`${rel.getRelType()}\`]-(n${nIdx})`;
                 }
                 queryReturn =  `RETURN DISTINCT n${nIdx}`;
                 returnType = 'node';
@@ -222,7 +222,7 @@
      * 
      * Updates the results and nextQuery attributes and relations.
      */
-    updateQuery() {
+    runQuery() {
         this.createCypherQuery();
         this.state.resultInfo = 'loading...';
         /*