Sukaant,
can you do the same query from the neo4j shell, e.g.

neo4j-shell

ls 2

?


G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

Neo4j 2.0.0                                  -
(graphs)-[:FOR]->(everyone)<http://blog.neo4j.org/2013/12/neo4j-20-ga-graphs-for-everyone.html>
Kids LAN creative party in Malmö  - Kidscraft ICE <http://kidscraft.se>


On Fri, Jan 31, 2014 at 8:07 AM, Sukaant Chaudhary <
[email protected]> wrote:

> Hi Michael,
> I'm sending you 4 Screen shots:
> Screen shot 1 : Here I'm passing "usernode": 2, from my java code.
> Screen shot 2 : This is what I'm getting when I'm passing "usernode": 2
> for the first time after Screen shot 1.
> Screen shot 3 : This is what I'm getting when I'm passing "usernode": 2
> after Screen shot 2.
> Screen shot 4 : This is what I'm getting when I'm passing "usernode": 4
> after Screen shot 2.
>
> But when I pass usernode = 2 after Screen shot 1 from console it works
> fine and I get the result as in Screen shot 3.
>
> -Sukaant Chaudhary
>
>
> On Thu, Jan 30, 2014 at 8:00 PM, Michael Hunger <
> [email protected]> wrote:
>
>> Sorry, no idea. Could you share a runnable unit test that shows that
>> behavior?
>>
>> Michael
>>
>> Am 30.01.2014 um 15:18 schrieb Sukaant Chaudhary <
>> [email protected]>:
>>
>> Hi Michael,
>> Please help what I'm doing wrong here.
>>
>> -Sukaant Chaudhary
>>
>>
>> On Thu, Jan 30, 2014 at 4:30 PM, Michael Hunger <
>> [email protected]> wrote:
>>
>>> Are you 100% sure you have the same data initially? If one of the start
>>> nodes is not matched it doesn't do anything.
>>>
>>> Can you also do a diff for the 2 queries and confirm that they only
>>> differ in the params?
>>>
>>> Thanks
>>>
>>> Michael
>>>
>>> Am 30.01.2014 um 11:10 schrieb Sukaant Chaudhary <
>>> [email protected]>:
>>>
>>> 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.
>>>
>>>
>>>
>>> --
>>> 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.
>>>
>>
>>
>> --
>> 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.
>>
>>
>>  --
>> 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.
>>
>
>  --
> 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.
>

-- 
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.

Reply via email to