Now, for the third time, I’ve run into some weird and wonderful situation where a lazy object wasn’t initialized when I was using it. When will I learn? Don’t use FetchType.LAZY unless you’re really know what you’re doing, and test carefully afterwards. The precise problem I seem to be having is that my hashCode() and equals() methods don’t work. Anyway, a word of caution!
Hibernate + fetch=FetchType.LAZY making trouble