@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,那么我怎样才能获取部门manully? @Fetch注释不灵活