日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

java版本的getorcreate,getOrCreate for java-rest-api neo4j失敗

發(fā)布時間:2023/12/2 编程问答 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 java版本的getorcreate,getOrCreate for java-rest-api neo4j失敗 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

我有一個簡單的關係測試,我試圖運行使用Rest API創(chuàng)建一個獨特的節(jié)點(java-rest-binding)https://github.com/neo4j/java-rest-binding但不幸的是我被困在某些東西上,這裏是細節(jié):(非唯一的節(jié)點和關係工作完全正常,與這一點,它沒有,很有可能我做的東西幼稚(原諒我缺乏的Neo4j的知識)getOrCreate for java-rest-api neo4j失敗

final UserModel userModel = new UserModel();

final HashMap uModelAttributes = new HashMap(0);

uModelAttributes.put("name", "AnirudhVyas");

userModel.setAttributes(uModelAttributes);

final HashSet buyHistory = new HashSet();

final Action buyAction = new Action();

final ProductModel productModel = new ProductModel();

final HashMap attributes = new HashMap(0);

attributes.put("name", "mercedes benz ");

attributes.put("make", "mercedes benz");

attributes.put("model", "sls 550");

attributes.put("year", "2014");

productModel.setAttributes(attributes);

buyAction.setProduct(productModel);

buyHistory.add(buyAction);

userModel.setBuyHistory(buyHistory);

System.out.println("Before");

new UserModelDAO().createCompleteTree(userModel);

System.out.println("Completed >>>

,如果我。使用此道:

final RestNode root = api.getOrCreateNode(api.index().forNodes("users", MapUtil.stringMap(IndexManager.PROVIDER, "lucene", "type", "fulltext")), "name", m

.getAttributes().get("name"), m.getAttributes());

api.getOrCreateNode(api.index().forNodes("products", MapUtil.stringMap(IndexManager.PROVIDER, "lucene", "type", "fulltext")), "name", buyAction.getProduct().getAttributes().get("name"), buyAction.getProduct().getAttributes()), RelationshipTypes.BOUGHT);

這基本上失敗:

java.lang.RuntimeException: Error retrieving or creating node for key name and value AnirudhVyas with index users

at org.neo4j.rest.graphdb.ExecutingRestAPI.getOrCreateNode(ExecutingRestAPI.java:448)

at org.neo4j.rest.graphdb.RestAPIFacade.getOrCreateNode(RestAPIFacade.java:223)

at xxxx.xxxx.xxxx.graph.UserModelCreateTasteKeyNeo4JBatchCallback.recordBatch(UserModelCreateTasteKeyNeo4JBatchCallback.java:61)

總結

以上是生活随笔為你收集整理的java版本的getorcreate,getOrCreate for java-rest-api neo4j失敗的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。