Title:
Bug 83587:(Watson Migration Closure)duplicate() on a persistent object causes the entire graph to be fetchedWhile this behavior may sometimes be warranted, I believe we need an option for duplicating the object just as it is, without ha
| View in TrackerStatus/Resolution/Reason: To Fix//
Reporter/Name(from Bugbase): marc esher / marc esher (marcesher)
Created: 07/14/2010
Components: ORM Support
Versions: 9.0.1
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 /
Priority/Frequency: Major / Unknown
Locale/System: English / Platforms All
Vote Count: 0
Problem:
duplicate() on a persistent object causes the entire graph to be fetchedWhile this behavior may sometimes be warranted, I believe we need an option for duplicating the object just as it is, without having all the associations pulled at time of duplicate
Method:
1) create a number of ORM components that are highly related (parents have children, children have parents, children have siblings, siblings share the same parent, etc2) create an instance of one of those objects which you know, were you to not lazy fetch, would cause a lot of database activity and a lot of objects to be created3) run duplicate() on that instance4) with hibernate logging turned on, watch the console... it'll spit out gazillions of queries. duplicate will take many seconds. eventually your object will duplicate()
Result:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3041768
External Customer Info:
External Company:
External Customer Name: marc esher
External Customer Email: 70390EBF47F01CAF992015B9
External Test Config: 07/14/2010
Attachments:
Comments: