【发布时间】:2015-03-03 11:55:11
【问题描述】:
有一个Country 类:
public class Country {
public int id;
public String name;
public String locale;
}
我必须插入neo4j。
我在做什么:
public void insert(Country country) {
engine.query("create (n:Country {name:'"+country.name+"',id:"+country.id+",locale:'"+country.locale+"'})",null);
}
但是我想把 Object 直接放到带有标签的 neo4j 中。
我正在使用带有 java 1.8 和 libraryDependencies 的 play framework 2.3.7
"org.neo4j" % "neo4j-rest-graphdb" % "2.0.1",
"com.sun.jersey" % "jersey-server" % "1.7",
"com.sun.jersey" % "jersey-core" % "1.7",
"com.sun.jersey" % "jersey-json" % "1.7",
【问题讨论】:
标签: java playframework neo4j cypher spring-data-neo4j