Hibernate throws MultipleBagFetchException - cannot simultaneously fetch multiple bags

前端 未结 15 2003
广开言路
广开言路 2020-11-22 12:49

Hibernate throws this exception during SessionFactory creation:

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

15条回答
  •  借酒劲吻你
    2020-11-22 13:14

    Simply change from List type to Set type.

    But remind that you won't eliminate the underlaying Cartesian Product as described by Vlad Mihalcea in his answer!

提交回复
热议问题