I don't see this as a bug. The implemented behaviour is congruent to what I expect from a REST interface.
-- Tatham -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Boris Kizelshteyn Sent: Tuesday, 9 August 2011 1:04 AM To: Neo4j user discussions Subject: Re: [Neo4j] update node properties via rest? Is there a plan to fix this or will updates continue to be overwrites? Many thanks! On Thu, Jul 28, 2011 at 10:43 AM, Boris Kizelshteyn <[email protected]>wrote: > It is a put right now and the semantics are clear I think, update > means add stuff that isn't there and change stuff that's different. > Adding an empty value should clear that value and not including means do > nothing. > >> >> When updating is really important in the rest context is in batching, >> basically, now, there is no way to batch update efficiently. You have >> to query for the nodes you want to change and send that call and then >> add to those values in code and then send the values back as an >> overwrite. Javier's excellent REST lib makes this a little easier >> code wise, but suffers from being unusably slow for large updates because of >> this REST limitation. >> >> If infact this is the reasoning (what to do with missing values) >> behind making it a replace and not an update, I vote for changing it to >> update. >> >> Furthermore, I believe that calling a named resource with a PUT and >> overwriting it violates RESTfull design. i.e. Put to /node/0 should >> overwrite, while /node/0/properties should update. >> >> See this link: >> >> >> http://en.wikipedia.org/wiki/Representational_State_Transfer#RESTful_ >> web_services >> >> (I know wikipedia references are not that strong, but this is >> straight out of an o'rielly design patterns book which is a little >> stronger :)) >> >> I don't mean to start a holy war about standards (rest isn't really a >> standard anyway), I'm just saying that currently this feature doesn't >> work as advertised and makes it hard to update large datasets quickly via >> rest. >> >> Thanks! >> >> >> >> On Thu, Jul 28, 2011 at 8:21 AM, Jim Webber <[email protected]>wrote: >> >>> Feature (though perhaps PUT) would be a better choice of method. >>> POSTing a new set of properties can't update, because the semantics >>> aren't clear - what would it mean if a property was missing, is that >>> an effective DELETE, or an indication it should be left alone. >>> >>> Jim >>> _______________________________________________ >>> Neo4j mailing list >>> [email protected] >>> https://lists.neo4j.org/mailman/listinfo/user >>> >> >> _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

