Hi,
If I'm using the following query from the console then it is working fine:
But when I'm using it at my Java Code then at the first time it is creating
relation without deleting but when I pass the same data again then it works.
Please help me what is the issue at Java Query.
Here I'm using n=node(2) or n=node(4)
*Query At Console:* (Works Fine)
START n=node(2), m=node(16541)
MATCH ()-[r:MODIFY_TIME|ACCEPT_TIME|TENTATIVE_TIME|REJECT_TIME]->(m)
DELETE r
WITH DISTINCT n,m
CREATE n-[:ACCEPT_TIME]->m
WITH DISTINCT n,m
CREATE n-[s:MODIFY_TIME]->m
SET m.userTimeDate = "2014-01-30", m.userTimeStartTime = "11:55",
m.userTimeEndTime = "12:55", m.userTimeModifiedTS = "2014-01-30
15:02:34.489"
RETURN m,s;
*Query At Java Code:* (Works In the second time)
{
"query": "START n=node({usernode}), m=node({timenode}) MATCH
()-[r:MODIFY_TIME|ACCEPT_TIME|TENTATIVE_TIME|REJECT_TIME]->(m) DELETE r
WITH DISTINCT n,m CREATE n-[:ACCEPT_TIME]->m WITH DISTINCT n,m CREATE
n-[s:MODIFY_TIME]->m SET m.userTimeDate = {userTimeDate},
m.userTimeStartTime = {userTimeStartTime}, m.userTimeEndTime =
{userTimeEndTime}, m.userTimeModifiedTS = {userTimeModifiedTS} RETURN m,s",
"params": {
"usernode": 4,
"timenode": 16541,
"userTimeDate": "2014-01-30",
"userTimeStartTime": "11:55",
"userTimeEndTime": "12:55",
"userTimeModifiedTS": "2014-01-30 15:31:06.222"
}
}
-Sukaant Chaudhary
--
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/groups/opt_out.