开发者

Naming resources prior to creation using Neo4j Restful API

开发者 https://www.devze.com 2023-03-29 03:07 出处:网络
This is for people with knowledge on REST and Neo4j. Is it possible to name a node before creating it in Neo4j ?

This is for people with knowledge on REST and Neo4j. Is it possible to name a node before creating it in Neo4j ? Typical Restful thing, you create a URI "XXX/db/data/node/mynode" and you want to create a node with this identifier if it is not existent in the moment. For all that I have been researching (and testing) to the present moment, the answer is : "no it is not possible, neo4j will just always automatically give ids to the created nodes and the attempt to do create a URI and use POST 开发者_JS百科to cause its creation will result in 405"

Thanks in advance.


That's correct, you can't set the id of a node. What you can do is to add some other kind of id as a property, see create node with properties. Just make sure it's indexed automatically and then you can query that index for exact matches.

0

精彩评论

暂无评论...
验证码 换一张
取 消