Bug 453186 - CRUD operations in GenericHibernateDAO should not flush, clear, commit the session
CRUD operations in GenericHibernateDAO should not flush, clear, commit the se...
Product: JBoss Customer Support Portal
Classification: Retired
Component: Web-General (Show other bugs)
All All
medium Severity medium
: ---
: ---
Assigned To: Nathan Lugert
David Spalding
Depends On:
Blocks: HibernateIssues
  Show dependency treegraph
Reported: 2008-06-27 14:45 EDT by John Sanda
Modified: 2015-01-19 19:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-01-05 13:34:44 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description John Sanda 2008-06-27 14:45:36 EDT
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:
Actual results:

Expected results:

Additional info:
Comment 1 David Spalding 2011-01-05 13:34:44 EST
Superceded by Avalon. This component is no longer valid.

Note You need to log in before you can comment on or make changes to this bug.