Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/neo4j/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Nosqlunit-neo4j无法将标签分配给Spring数据neo4j 4中的节点_Neo4j_Spring Data Neo4j_Spring Data Neo4j 4 - Fatal编程技术网

Nosqlunit-neo4j无法将标签分配给Spring数据neo4j 4中的节点

Nosqlunit-neo4j无法将标签分配给Spring数据neo4j 4中的节点,neo4j,spring-data-neo4j,spring-data-neo4j-4,Neo4j,Spring Data Neo4j,Spring Data Neo4j 4,由于删除了TypeRepresentationStrategy,Nosqlunit-neo4j似乎与SDN 4不兼容。它将以下graphml xml文件中定义的节点添加到测试数据库中,但不为其分配标签,因为repository.count()返回0。但是,如果我以本机方式查询数据库,那么它会获取没有任何标签的节点 <?xml version="1.0" encoding="UTF-8"?> <graphml xmlns="http://graphml.graphdrawing.

由于删除了TypeRepresentationStrategy,Nosqlunit-neo4j似乎与SDN 4不兼容。它将以下graphml xml文件中定义的节点添加到测试数据库中,但不为其分配标签,因为repository.count()返回0。但是,如果我以本机方式查询数据库,那么它会获取没有任何标签的节点

<?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns">
    <key id="__type__" for="node" attr.name="__type__" attr.type="string"></key>
    <key id="productId" for="node" attr.name="productId" attr.type="string"></key>

    <graph id="G" edgedefault="directed">
        <node id="3">
            <data key="__type__">com.my.package.Product</data>
            <data key="productId">100001235</data>
            <index name="__types__" key="className">com.my.package.Product
            </index>
        </node>
    </graph>
</graphml>

com.my.package.Product
100001235
com.my.package.Product

是否有人面临同样的问题?

如果您直接使用标签
产品
,它应该会起作用。
您不再需要索引或
\uuuuuuuuuuuuuuuuuuuu
属性了。

您能给我举个例子吗?因为当我在节点元素中添加“label”属性时,它不起作用。如果我使用json格式(SpringTemplateInsertionStrategy和SpringTemplateComparisonConstStrategy),那么它会抛出异常java.lang.NoClassDefFoundError:org/springframework/data/neo4j/support/Neo4jTemplate,因为支持包在sdn 4中不可用