Skip child to fetching of parent - JPA
问题 I am facing an issue where the data is getting fechted recursively. I wanted to avoid the child to fetch the parent data. Which is causing a recursive issue. I have mentioned the code below Pojo Structure class Parent { .. @OneToMany(mappedBy = "parent", fetch = FetchType.LAZY) private List<Child> childs; .. } class Child { .. @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "parentId") private Parent parent; .. } Fetching the data like this ` em = EMF.get().createEntityManager(); Query