Neo4j找不到Long值

时间:2016-04-18 08:47:25

标签: neo4j spring-data-neo4j-4

我正在使用Neo4j 2.3.3和SDN 4.1.1

当我保存具有长值的节点时。 (例如:memberNo:6267057069360176000) 并在浏览器中找到了MyMemberNo。

Match (n:Member{memberNo:6267057069360176000}) Return n

这个查询找不到任何东西。 当我将memberNo更改为String。

Match (n:Member{memberNo:'6267057069360176000'}) Return n

它可以找到。

我的代码中是错误还是错误?

1 个答案:

答案 0 :(得分:0)

由于:

所有使用Spring转换服务转换为String的字段都将存储为字符串。 Spring Data Neo4j包含处理以下类型的默认类型转换器

java.math.BigInteger到String属性

https://github.com/spring-projects/spring-data-neo4j/blob/master/src/main/asciidoc/reference/programming-model/node-entities.adoc#property-optional-annotation-for-property-fields