To change lazy loading, just change the acquisition type in the generated file to eager
fetch = FetchType.EAGER
@ManyToOne(fetch = FetchType.EAGER)//Change lazy loading to hungry loading mode to avoid noSession @JoinColumn(name = "plan_id") public PlanTable getPlanTable() { return this.planTable; }