I have One-To-Many relationship, here is my code
@Entity
@Table(name = \"catalog\")
public class Catalog {
@Id
@GeneratedValue(strategy = GenerationType
I had the same problem but a fixed by:
@OneToMany
@JoinColumn(name = "assigned_ingredient", referencedColumnName = "ingredient_id")
@Fetch(FetchMode.JOIN) // Changing the fetch profile you can solve the problem
@Where(clause = "active_ind = 'Y'")
@OrderBy(clause = "meal_id ASC")
private List ingredients;
you can have more information here: https://vladmihalcea.com/the-best-way-to-handle-the-lazyinitializationexception/