Hibernate Issuing select statement even if FetchMode = Join

后端 未结 4 1798
挽巷
挽巷 2021-02-01 15:41

I have a userAccount entity mapped with a country entity . The country mapping in UserAccount class is like this

@ManyToOne(fetch=FetchType.EAGER)
@Fetch(FetchMo         


        
4条回答
  •  情歌与酒
    2021-02-01 16:20

    Remove the fetch=FetchType.EAGER. Eager fetching triggers cascading select statements.

提交回复
热议问题