我正在尝试找到具有多个传入关系的所有节点.鉴于此数据:
a-[has]->b
a-[has]->c
d-[has]->b
Run Code Online (Sandbox Code Playgroud)
所以,我正在寻找一个返回'b'的查询,因为它有更多的传入.
此查询已结束.它返回'a'和'b',因为它们都有2个关系:
match (n)--()
with n,count(*) as rel_cnt
where rel_cnt > 1
return n;
Run Code Online (Sandbox Code Playgroud)
但是,此查询(添加' - >')不返回任何内容,我不知道原因:
match (n)-->()
with n,count(*) as rel_cnt
where rel_cnt > 1
return n;
Run Code Online (Sandbox Code Playgroud)
我错了吗?
我有一个mongodb的小示例项目,无法让注释处理器工作.我正在使用以下示例:
http://www.querydsl.com/static/querydsl/latest/reference/html/ch02s07.html
跑步mvn clean install产生:
Annotation processor 'com.querydsl.mongodb.morphia.MorphiaAnnotationProcessor' not found
Run Code Online (Sandbox Code Playgroud)
我到处寻找那个处理器.只是找不到它.这是pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.stevesando</groupId>
<artifactId>FindAll</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
<version>1.2.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>1.2.1.RELEASE</version>
</dependency>
<dependency>
<groupId>com.mysema.querydsl</groupId>
<artifactId>querydsl-mongodb</artifactId>
<version>3.6.0</version>
</dependency>
<dependency>
<groupId>com.mysema.querydsl</groupId>
<artifactId>querydsl-apt</artifactId>
<version>3.6.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>com.mysema.maven</groupId>
<artifactId>apt-maven-plugin</artifactId>
<version>1.1.3</version>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
<configuration>
<outputDirectory>target/generated-sources/java</outputDirectory>
<processor>com.querydsl.mongodb.morphia.MorphiaAnnotationProcessor</processor>
</configuration>
</execution>
</executions> …Run Code Online (Sandbox Code Playgroud)