2010.04.08———cannot simultaneously fetch multiple bags异常
Caused by: org.hibernate.HibernateException: cannot simultaneously fetch multiple bags,
用户登录时,同步实时加载用户的角色对象、权限对象,而往往这些关系都是多对多关系,就单一列内容来看存在重复的值,从而引起multiple bags。我在网上搜索这类结果,几乎都提出一个解决办法——采用延迟加载,即fetch=FetchType.LAZY,这样就束缚了框架的强大功能
问题原因就是,当持久框架抓取一方的对象时,同时加载多方的对象放进容器中,多方又可能与关联其它对象,Hibernate实现的JPA,默认最高抓取深度含本身级为四级(它有个属性配置是0-3),若多方(第二级)存在重复值,则第三级中抓取的值就无法映射,按照这个道理,就应该报出无法同时加载多个包之异常
一对多或多对多的多方数据抓取过来后必须用容器类存,例如Set、List、Map等,主要就在这个容器上
即@ManyToMany或@OneToMany的Many方此时一定用Set容器来存放,而不能用List集合。
分享到:
相关推荐
以便更好地适应机器学习模型,比如阴影检测、水体检测或覆盖物检测,因为提到了“using the checkpoints to get result of shadow, water and layover simultaneously”。然而,由于没有具体使用 TensorFlow,这可能...
You can communicate with multiple ports simultaneously. See the Quick Start Guide. MBAXP Technical Facts and Features: RTU Mode. ASCII Mode. Modbus TCP/IP. Multi-threaded for high data throughput. ...
罗兰的经典音色库,小且实用。 Note: This release contains only the VSTi as it is the only component updated in v1.03. Orchestral instruments come alive with ... several audio devices...simultaneously!
You will learn language and theory simultaneously, mastering the core techniques necessary to develop good coding practices and enhance your skill set. This book provides thorough coverage of ASP.NET...
08年英语六级核心词汇-副词+名词 deliberately ad. 故意,有意地 deliberately ad. 深思熟虑地,审慎地 exclusively ad. 仅仅地 explicitly ad. 明确地 forcibly ad. 强行地,有力地 formerly ad. ...
- ADD: Delphi/CBuilder 2010 now supported. - ADD: Delphi/CBuilder 2009 now supported. - ADD: New demo project FlexCADImport. - FIX: The height of the TFlexRegularPolygon object incorrectly changes ...
The main challenge in solving BVPs is finding a solution that satisfies both boundary conditions simultaneously. Unlike initial value problems where we have a unique solution, BVPs often have ...
* Simulate multiple physics worlds simultaneously * Simulations independent of game loop * Access to every byte of source code * Softbodies, ropes, cables and cloth * Featherstone inverse dynamics * ...
You can now display multiple result sets simultaneously and can compare them: CLOBs and BLOBs are now fetched on demand to improve query performance. Single record view will now show column comments ...
支持一些软件试用期的破解。...You can run multiple applications simultaneously, each application works with different date and time, while the real date/time of your system continues to run normally.
EASE offers the best of both worlds ... Industry standard version control environments deal with design and configuration management enabling multiple users to work simultaneously on one EASE project.
Published simultaneously in Canada ISBN: 978-0-470-50225-9 Part i: The C# language Chapter 1: .NET Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Chapter 2: Core C# . . . . . ....
Published simultaneously in Canada ISBN: 978-0-470-50225-9 Part i: The C# language Chapter 1: .NET Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Chapter 2: Core C# . . . . . ....
Selecting DataFrame rows and columns simultaneously Getting ready How to do it... How it works... There's more... Selecting data with both integers and labels Getting ready How to do it... How it ...
Differential absorption lidar (DIAL) has ... In this paper, a simple and accurate algorithm is presented for simultaneously detecting and estimating multiple vapor materials with multiple-wavelength DI
Many applications, such as graphical interfacebased software, must attend to multiple tasks simultaneously. These tasks must cooperate to behave correctly, and threads meet the needs of cooperative ...
We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license ...
Published simultaneously in Canada Library of Congress Control Number: 2006939606 ISBN: 978-0-470-04401-8 0-47004-401-2 Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 No part ...