Hi all,
I have an object with collections, which I have made Lazy, because sometimes I just want to grab the columns in the object itself, without grabbing information from the related tables. However, every time I load this object I am going to get a "LazyInstantiationException" when I pass it on to the struts xslt result. What is the best practice in getting around this? After reading around about it I thought I could just create a Hibernate filter to open the element in the view, but it seems that this just grabs the lazy collections from the database anyway, which is what I am trying to avoid in the first place. Do I have to create and return some kind of wrapper for the original element that hides the lazy collections? This does not seem a very efficient way to do things.
Thank you in advance for the help.
|