My guess is you have a collection of proxies until you call a method on those proxies (I'm assuming the implicit call to toString() is the method). Can't say for sue without reading the Hibernate source. Just out of curiosity, why would you ever need to do 1? Do you have occasions where you want to return data from the database and do nothing with it?
How would I do the "Hibernate.initialize" normally in JPA 2-standard?
You can't, but again I can't think of a case where you might need to. Am I missing something?
I want to fetch my collections via a condition, so annotating my collection with FetchType.EAGER is not usefull in this case.
I only want to touch the collection so it is fetched - the collection is not used within the same transaction so it automatically gets unmanaged - which is what I want!
(I also cannot use a separate query with "left join fetch" as there are more than one collections..)
so I use this, which works fine in my case:
However, Hibernate.initialize is not JPA-Standard-conform.