You have to iterate over the result, as you return the r. Or you don't return anything.
On Tue, Sep 9, 2014 at 7:19 AM, Tobias Jakob <[email protected]> wrote: > Hi guys, > > Im trying to execute a query, which shall create relationships between > existing nodes. > Here is the belonging piece of code: > > ExecutionEngine engine = new ExecutionEngine( db ); > > String query = > "MATCH (fromNode:" + fromNode + "), ( toNode:" + toNode + ")" + > " WHERE fromNode." + fromProperty + " = toNode" + "." + toProperty + > " CREATE (fromNode)-[r:" + relName + "]->(toNode)" + > " RETURN r;"; > ExecutionResult result = engine.execute(query); > > But after execution, no relationships have been created. > I already checked, if the result of the match return the right nodes and > it does. > > It seems like this ExecutionEngine is read-only. > > Is this true? What is the problem here? > > Thanks for help! > > Greetings > Tobias > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
