File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes EJB Lazy Loading etc.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB Lazy Loading etc.." Watch "EJB Lazy Loading etc.." New topic
Author

EJB Lazy Loading etc..

Nicky Formosa
Greenhorn

Joined: Mar 05, 2007
Posts: 14
Hi All,

I'm quite new to EJBs, Hibernate etc..

My issue is: I have a DTO which has a few OneToMany and ManyToMany relationships, which i have set them to Load Lazy. Using the EntityManager i want to load the Main DTO. If i try to access a relationship from the main dto i get an error stating that "".

This i could solve using the Join Fetch through HQL but my question is: is there another way of doing things or?

Also what is bothering me is the fact that manytomany relationships access via the Main DTO do not return unique results instead it reaturns a full join!!

Thanks for your time...

Best regards
Nick
Nicky Formosa
Greenhorn

Joined: Mar 05, 2007
Posts: 14
update: the error showing was : "failed to lazily initialize a collection of role...."
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB Lazy Loading etc..
 
Similar Threads
JPA Many to Many relationship with attribute to self
hibernate left join fetch question
Lazy Loading problems and solutions
i not wnat to lazy initialization
1 to many case : howto ?