Today i upgraded to 2.3.5_04. My program stopped working. After some debugging i found out that all fields of retrieved objects are on their default value till i first call a getter or detach them explicitly. Up to 2.3.4 they where initialized immediately. The problem in my case is that i have a Spring DAO.
It does the following:
I call for example getUserByName("blub).
- Spring creates an em and starts a transaction.
- I get the desired user.
- I return the user.
- Spring closes the transaction and the em.
With 2.3.5_04 I get an empty detached user object back. Only the id is correct.
Shouldn't the detach and field population happen implicitly during em.close()?