I'm currently in the process of switching from Hibernate to pure JPA 2 (which by the way turned out to be much more time consuming than I initially expected).
The biggest problem I'm having so far is finding a way to force eager loading of lazy properties.
With Hibernate this was done using: criteria.setFetchMode("person", FetchMode.JOIN);
.
Is there any way to do this with JPA 2?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…