• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

EJB Lazy Loading etc..  RSS feed

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
update: the error showing was : "failed to lazily initialize a collection of role...."
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!