neo4j 用户定义过程:"cannot find symbol: class Transaction"

neo4j user defined procedure: "cannot find symbol: class Transaction"

我正在尝试使用 the example user defined procedure supplied by neo4j 构建一个简单的用户定义过程。但是,当我尝试使用 "Transaction tx = db.beginTx()" 获取 Transaction 实例时,编译器抱怨它无法解析 Transaction 的符号。

如有任何建议,我们将不胜感激。

这个答案很简单。只需导入交易包 "org.neo4j.graphdb.Transaction"