Hibernate lazy-load application design
问题 I tend to use Hibernate in combination with Spring framework and it's declarative transaction demarcation capabilities (e.g., @Transactional). As we all known, hibernate tries to be as non-invasive and as transparent as possible, however this proves a bit more challenging when employing lazy-loaded relationships. I see a number of design alternatives with different levels of transparency. Make relationships not lazy-loaded (e.g., fetchType=FetchType.EAGER) This vioalites the entire idea of