Regular |
|
Joined: Wed Feb 22, 2006 11:28 am Posts: 65 Location: Santiago, Chile
|
Hello Friend:
I saw you have used Spring Framework with Hibernate, I am too. When you don´t specify explicitly in your assotiation collections "lazy=false", Spring should throws you a "NullPointerException" for initializing the lazy entities or collections.
I still research how can we sovle this problem without change the code as I posted you.
I think, you may used hibernateTemplate to load a entity by a key. You can get a "Session" opened from hibernateTemplate to do it again, I guess that wouldn´t throws you a exception.
Spring manage by itself the session. You should read in more detail about session in view pattern.
Regards.
|
|