[Hibernate] Lazy initialization problem

2003-10-26 Thread Andrew Zeon
Hi, I have a class called CompanyImpl which represents a company. Within this class I have a list of users (List that contains a UserImpl objects). Our application uses a MVC model. Right now, we have a class callled DataAccessLayer which has all the persistence methods. There are 'restore' method

Re: [Hibernate] Lazy initialization problem

2003-10-26 Thread Gavin King
Really, the correct approach is to use lazy initialization together with "open session in view". Alternatively, you can use an OUTER JOIN FETCH query to retrieve the users more efficiently. Andrew Zeon wrote: Hi, I have a class called CompanyImpl which represents a company. Within this class I ha

RE: [Hibernate] Lazy initialization problem

2003-10-27 Thread Andrew Zeon
How does EJBs address this issue? thanks. -Original Message- From: Gavin King [mailto:[EMAIL PROTECTED] Sent: Monday, 27 October 2003 2:12 PM To: Andrew Zeon Cc: Hibernate (E-mail) Subject: Re: [Hibernate] Lazy initialization problem Really, the correct approach is to use lazy