Hi Dan,

I guess you were right with the thought process - 


nivs wrote:
> 
>  If you're still getting an LIE,> there may be another association at play
> (a child of Phone?).
> 

I noticed that when I navigated, it was only when the PhoneType which was an
entity (if not a collection on Phone) of Phone; when it was rendered threw
the exception.

public class Phone{

 String phoneNumber;
 PhoneType phoneType; //This one

}

So in the initial fetch, i got back 10 items and the List view rendered 5 of
them. The OpenSessionInViewFilter closed the session after I rendered 5
Phone items along with PhoneType. When i hit the next page button, since I
resorted to pulling the items of the Model(CPM), when it came to PhoneType
it threw the exception. The Set<Phone> was available since I had manually
iterated them in the DAO, so that was not a problem.

Apologies for not pondering deeper from your thoughts. So now I fetch items
for every pagination this opens a Session now I need to optimize it in terms
of hitting the back end.

Mm well...thank you one and all for your thoughts. I still have to get
around how I can add multiple phone numbers using this design.

Many thanks again
Niv



-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Hibernate-Related-LazyInitializationException-tp3068534p3075946.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to