Hi)
When I try to use findAll or findById repository methods I haven't get result (I have get java heap space error)
Spring Boot version 2.4.1
I use spring-boot-starter-data-neo4j
My entities:
@Data
@Node("Template")
public class TemplateEntity {
@Id
@GeneratedValue
private Long id;
private String name;
@CreatedDate
private LocalDate dateCreated;
@Relationship(type = "HAS_AUTHOR")
private UserEntity author;
@Relationship(type = "IN_TEMPLATE_FOLDER")
private TemplateFolderEntity folder;
@Relationship(type = "HAS_QUESTION")
private Set<TemplateQuestionRelationship> questions = new HashSet<>();
}
@Data
@Node("TemplateFolder")
@EqualsAndHashCode(of = {"name"})
public class TemplateFolderEntity {
@Id
@GeneratedValue
private Long id;
private String name;
@CreatedDate
private LocalDate dateCreated;
@LastModifiedDate
private LocalDate dateModified;
private boolean root = false;
@Relationship(type = "HAS_CHILD_FOLDER")
private Set<TemplateFolderEntity> children = new HashSet<>();
}
Nodes example:
I have relationship only between Template and TemplateFolder (for test)
When I try to select template by id I expect that db find my template and will go to all nodes that my template has with OUTGOING relationship. But seems db processing all relationship nodes (with relationship incoming/outgoing) and my query never ends.
When I testing logic with one template node in db I have get result.
Somebody can help me, what I did not correctly? Thanks)