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

前端 未结 7 1648
执念已碎
执念已碎 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条回答
  •  臣服心动
    2020-12-17 09:58

    I think that it would be similar to EclipseLink, there you need to have enabled weaving otherwise, the fetch setting takes no effect. The weaving requires bytecode access. This could help: https://stackoverflow.com/a/18423704/7159396

提交回复
热议问题