[英]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.