Neo4J OGM - org.neo4j.ogm.exception.CypherException:未知函数ID()

时间:2017-03-16 10:15:22

标签: java swing neo4j neo4j-ogm

我得到了

org.neo4j.ogm.exception.CypherException: Error executing Cypher; 
    Code: Neo.ClientError.Statement.SyntaxError; Description: Unknown Function ID() 

当我在按钮侦听器方法中的 Java Swing应用程序中使用session.save()方法时。

如果我在控制台应用上使用相同的方法和对象,我有无异常

Neo4j版本是“带有OGM 2.2.1版本的Neo4j 3.1。”

@NodeEntity
public class TestEntity {

@GraphId
private Long id;

private String name;

public TestEntity() {
    // TODO Auto-generated constructor stub
}

public Long getId() {
    return id;
}

public void setId(Long id) {
    this.id = id;
}

public String getName() {
    return name;
}

public void setName(String name) {
    this.name = name;
}
}

我在按钮监听器中调用静态方法:

...
static save(){
TestEntity te = new TestEntity();
te.setName("AA");
session.save(te);
}...

0 个答案:

没有答案