[英]spring-data-neo4j, fetching relatedTo entity manully
@NodeEntity
@JsonIgnoreProperties(ignoreUnknown = true)
public class Employee {
@GraphId
private Long graphId;
@Indexed
private Long id;
private String name;
private String password;
@RelatedTo(type = "REPORT_TO", direction = Direction.OUTGOING)
private Department department;
}
我知道spring-data-neo4j可以在获取Employee实体时使用@Fetch来获取Department数据,但是并不是在每次获取Employee时都需要使用Department,那么如何才能手动获取Department? @Fetch注释不灵活
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.