Re: Hibernate LazyInitializationException

2009-06-25 Thread Neil Curzon
t; > >> The relevant section of the code where I am using the model is as > >> follows: > >> > >> public UpdateUserProfilePage() { > >> this(EzdecSession.getCurrentUser()); > >> } > >> > >> public UpdateUserProfilePag

Re: Hibernate LazyInitializationException

2009-06-25 Thread jpalmer1026
lePage(EzdecUser user) { >> this(new DetachableUserModel(user)); >> } >> >> private UpdateUserProfilePage(DetachableUserModel userModel) { >> this.user = (EzdecUser)userModel.getObject(); >> setup(); >> } >> >> Any

Re: Hibernate LazyInitializationException

2009-06-25 Thread Martin Sachs
hi you used "this.user = (EzdecUser)userModel.getObject();" This would hold in page and not initialized on next request. You have to hold the model in the page. We have also found an alternative way. You can write a simple Aspect with AspectJ to reinit all proxies. This can easily done with hib

Hibernate LazyInitializationException

2009-06-25 Thread jpalmer1026
I am getting an "org.hibernate.LazyInitializationException - could not initialize proxy - no Session" exception when I try to load an object stored in session. I understand but I am not certain about how to fix it with Wicket. In reviewing the Wicket In Action book, it looks like the way to ha