When do you get the exception? When running tests or when viewing it
in your browser? Which web framework are you using?

Matt

On 5/25/07, sparqle <[EMAIL PROTECTED]> wrote:

Hello,

I followed the online tutorial for 2.0. I then created my own classes with
many relationships between them.
For example, suppose I have class A and class B. An object of class A can
have several objects of class B (a one-to-many relationship).
So if I do this within my view/presentation code:

List  a = getAManager().getAll();
for(int i=0; i< a.size(); i++) {
   List b = a.get(i).getBs();
   for(int j=0; j<b.size(); j++){
         System.out.println("A is: " + a.get(i).getName()+ " B is: " +
b.get(j).getName());
   }
}

where getAManager obtains a reference to an AManager object.

I get Lazyinitialization error when the above code is executed. I tried
commenting out the OpenSessionInView filter and associated mapping. That did
not seem to help.
I even followed the
http://www.jroller.com/page/kbaum?entry=orm_lazy_initialization_with_dao
link, but I am not sure if I need to do anything with that as Appfuse 2.0 M4
already comes configured with OpenSessionInView filter.

Please help.
--
View this message in context: 
http://www.nabble.com/LazyInitialization---Appfuse-2.0-M4-tf3819159s2369.html#a10812732
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
http://raibledesigns.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to