Could not write content: failed to lazily initialize a collection of role

后端 未结 9 1481
说谎
说谎 2021-02-08 02:48

I have One-To-Many relationship, here is my code

@Entity
@Table(name = \"catalog\")
public class Catalog {

    @Id
    @GeneratedValue(strategy = GenerationType         


        
9条回答
  •  南旧
    南旧 (楼主)
    2021-02-08 03:48

    "You don't serialize in your JSON the children entities by using the com.fasterxml.jackson.annotation.JsonIgnore property"

    Add @JsonIgnore for hibernate lazy loading properties eg. @ManyToOne. That should work

提交回复
热议问题