Bug 453186

Summary: CRUD operations in GenericHibernateDAO should not flush, clear, commit the session
Product: [Retired] JBoss Customer Support Portal Reporter: John Sanda <jsanda>
Component: Web-GeneralAssignee: Nathan Lugert <nlugert>
Status: CLOSED WONTFIX QA Contact: David Spalding <dspaldin>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.3.9CC: nraghava
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-05 18:34:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 453175    

Description John Sanda 2008-06-27 18:45:36 UTC
Description of problem:
We have methods in GenericHibernateDAO that flush the session and commit the
transaction. It has explained to me that this was implemented to deal with
NonUniqueObjectExceptions that were getting thrown. I was told that this was (at
least in part) a problem because of the DTOs used with the SalesForces web services.

The Hibernate Session provides a merge operation to address exactly these types
of situations that result in NonUniqueObjectExceptions. In fact, merge() should
be preferred over saveOrUpdate().

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 David Spalding 2011-01-05 18:34:44 UTC
Superceded by Avalon. This component is no longer valid.