spring data neo4j 模型内包含自身,循环导致 StackOverflow 异常
@NodeEntity public class User {
@Id
@GeneratedValue
private Long id;
@Index(unique = true)
private String login;
private String fullName;
private Date lastLogin;
@Relationship(type = "knows")
public Set<User> friends;
public User() {}
如果图数据库出现环形关系就会导致导致 StackOverflow