@Basic(fetch = FetchType.LAZY) does not work?

前端 未结 7 1639
执念已碎
执念已碎 2020-12-17 09:17

I use JPA (Hibernate) with Spring. When i want to lazy load a Stirng property i use this syntax:

@Lob
@Basic(fetch = FetchType.LAZY)
public String getHtmlSum         


        
7条回答
  •  萌比男神i
    2020-12-17 09:59

    Lazy fetching only applies to references to other entities or collections of entities. It does not apply to values like String or int.

提交回复
热议问题