Bug 453186 - CRUD operations in GenericHibernateDAO should not flush, clear, commit the session
Summary: CRUD operations in GenericHibernateDAO should not flush, clear, commit the se...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: JBoss Customer Support Portal
Classification: Retired
Component: Web-General
Version: 1.3.9
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: ---
Assignee: Nathan Lugert
QA Contact: David Spalding
URL:
Whiteboard:
Depends On:
Blocks: HibernateIssues
TreeView+ depends on / blocked
 
Reported: 2008-06-27 18:45 UTC by John Sanda
Modified: 2015-01-20 00:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-01-05 18:34:44 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


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