Hi Suhail,

this is expected behaviour. PUT semantics in general means "replace
any existing data with the data I'm sending over right now". So if
you'd like to add/set a property "foo" (and only "foo") please use:

PUT /node/123/properties/foo
with "bar" as the payload/entity


2010/8/23, Suhail Ahmed <suhail...@gmail.com>:
> Hi David,
>
> I was just trying out the operations provided here :
> http://components.neo4j.org/neo4j-rest/ . I did the "Set properties on node"
> followed by "Set property on node" followed by get node. The response codes
> are coming back correctly. In terms of what I am expecting:
>
> 1. After the first PUT  I should GET back
>
> { "name": "Thomas Anderson",
>   "profession": "Hacker"
> }
>
>
> 2. After the second PUT I should get back
>
> { "name": "Thomas Anderson",
>   "profession": "Hacker",
>   "foo" : "bar"
> }
>
>
> instead I get back
>
> {
>  "foo": "bar"
> }
>
>
> Let me know if you need more information.
>
> Thanks
> cheers
> su./hail
>
>
> On Mon, Aug 23, 2010 at 5:10 AM, David Montag <
> david.mon...@neotechnology.com> wrote:
>
>> Hi Suhail,
>>
>> Could you explain the REST operation you're doing, what results you would
>> expect from that operation, and what actually happens?
>>
>> David
>>
>> On Sun, Aug 22, 2010 at 9:11 AM, Suhail Ahmed <suhail...@gmail.com> wrote:
>>
>> > Hi,
>> >
>> > i have been trying out the Neo4j REST interface and I found that PUT
>> > operation was replacing the existing properties of a node with a new
>> > one.
>> > This was happening on single values as well as multiple values. Is this
>> > a
>> > bug or am I doing something wrong here. I am using the REST plugin with
>> > Firefox.
>> >
>> > Cheers
>> > su./hail
>> > _______________________________________________
>> > Neo4j mailing list
>> > User@lists.neo4j.org
>> > https://lists.neo4j.org/mailman/listinfo/user
>> >
>> _______________________________________________
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>>
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>


-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to