I suspect this is just Hibernate 3.x behavior with cglib proxies around lazy loading. The times when it works is when the fields have been loaded already. Using the accessors will always get the fields initialized properly.

Changing the loading behavior in the mappings to be non-lazy one should be able to avoid this behavior. If we have a lot of code dealing with pojo members directly, we may want to do this. I believe the laziness defaults changed between 2.x and 3.x.

--a.



Reply via email to