Neo4j Cypher查询预填充来自相关节点的一些数据

时间:2015-10-16 15:04:45

标签: neo4j cypher spring-data-neo4j

我有一个以下SDN实体:

dontAskOptions.SetValue("IDS_WARN_GENERAL_WINXP_EOL", 0xffffffff, RegistryValueKind.DWord);

以及随后的Cypher查询:

NodeEntity
public class Comment extends Commentable {

    private final static String CREATED_BY = "CREATED_BY";
    private final static String COMMENTED_ON = "COMMENTED_ON";

    @RelatedTo(type = COMMENTED_ON, direction = Direction.OUTGOING)
    private Commentable commentable;

    @RelatedTo(type = CREATED_BY, direction = Direction.OUTGOING)
    private User author;

    private String text;
    ....
}

因此,此查询仅返回 @Override @Query("MATCH (c:Comment) WHERE id(c) = {commentId} RETURN c") Comment findOne(@Param("commentId") Long commentId); author.id映射。

如何更改此查询以便预填充例如User author

0 个答案:

没有答案