Issue Details (XML | Word | Printable)

Key: EJB-266
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Emmanuel Bernard
Reporter: sara forghani
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
z - Hibernate Entity Manager

Avoid collection loading during cascaded PERSIST (improving performance on heavily cascaded object graphs)

Created: 06/Feb/07 10:33 AM   Updated: 11/Jun/08 01:47 PM   Resolved: 15/Feb/07 12:08 AM
Return to search
Component/s: EntityManager
Affects Version/s: 3.2.1
Fix Version/s: 3.3.0.ga

Time Tracking:
Not Specified

File Attachments: 1. Zip Archive persist-test-case.zip (692 kB)

Environment: hibernate 3.2.2, hibernate-entitymanager 3.2.1.ga

Bug Testcase Reminder (view):
REMINDER: Bug reports should generally be accompanied by a test case
Participants: Emmanuel Bernard, king and sara forghani


 Description  « Hide

hibernate initializes lazy objects traversed by the persist operation;
for example, in this case (the project is attached):

class A has bidirectional one-to-many relationship to classes B1, B2, B3, B4
(b1List, b2List, b3List, b4List)

B1 has bidirectional one-to-many relationship to C1
(c1List)

B2 has bidirectional one-to-many relationship to C2
(c2List)

if we try persisting C2, it will also initialize B1, C1, B4 ... and other existing C2's
(you may find a more complete description of the issue at http://forum.hibernate.org/viewtopic.php?p=2340004#2340004)



sara forghani added a comment - 06/Feb/07 10:43 AM

actually a better description is "initializing lazy objects ..."


Emmanuel Bernard added a comment - 07/Feb/07 12:14 AM

hi, can you actually attach your sample project so that I'm sre I can reproduce the issue


sara forghani added a comment - 07/Feb/07 08:13 AM

sorry i thought i'd attached it ... it is attached now.


Emmanuel Bernard added a comment - 15/Feb/07 12:08 AM

Fixed, thanks for the test


king added a comment - 11/Jun/08 07:02 AM

Hi,

Can you tell us how this is fixed please? i am facing some problem using:

  • Hibernate 3.2.4.sp1
  • Hibernate validator 3.0.0.GA
  • Hibernate Commons Annotations : 3.0.0.GA
  • Hibernate Annotations: 3.0.0.GA
  • Hibernate EntityManager :3.3.1.GA

Thank you


Emmanuel Bernard added a comment - 11/Jun/08 01:47 PM

click on the fisheye tab on this issue (next to change history)