What I have:
Use Hibernate.initialize()
within @Transactional
to initialize lazy objects.
start Transaction
Hibernate.initialize(entity.getAddresses());
Hibernate.initialize(entity.getPersons());
end Transaction
Now out side of the Transaction you are able to get lazy objects.
entity.getAddresses().size();
entity.getPersons().size();