This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MultipleBagFetchException: cannot simultaneously fetch multiple bags. How to load 2 lists?

Muhammad Ramahy
Posts: 11
Eclipse IDE jQuery Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get this exception:

org.hibernate.loader.MultipleBagFetchException: cannot simultaneously fetch multiple bags

the cause as I think is that in my user bean I have the following code:

see that the messages list is eagerly loaded while the followers list is not lazy initialized.

in the dao I have this code:

to add a follower to the followers list
to save message in messages list
I don't know how to load 2 lists on same time and I can accept any work around if exists.
I agree. Here's the link:
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic