dozer

Prevent Dozer from triggering Hibernate lazy loading

拈花ヽ惹草 提交于 2019-11-27 04:16:56
问题 I am using Spring transactions so the transaction is still active when POJO to DTO conversion occurs. I would like to prevent Dozer from triggering lazy loading, so that hidden sql queries never occur : all fetching has to be done explicitly via HQL (to get the best control on performances). Is it a good practice (I can't find it documented anywhere) ? How to do it safely ? I tried this before DTO conversion : PlatformTransactionManager tm = (PlatformTransactionManager)