The reverse generation of hibernate changes the place of lazy loading

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;
	}

  

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325024720&siteId=291194637