[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4211?page=c...
]
Steve Ebersole closed HHH-4211.
-------------------------------
Resolution: Rejected
I am going to assume that you are using a strategy for performing id value generation. In
Hibernate (and JPA for that matter) ids are either generated or they are assigned by the
application. Not either/or. If so what you are trying is simply not supported.
Also, this is not a support form, this is a bug tracker; please use IRC or the forums in
the future to ask for help.
JPA method of merge failed to insert deleted records from database
-------------------------------------------------------------------
Key: HHH-4211
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4211
Project: Hibernate Core
Issue Type: Improvement
Components: entity-manager
Environment: 3.2.6.ga, Weblogic,JPA, Windows
Reporter: Hari
Original Estimate: 10m
Remaining Estimate: 10m
The following is my requirement.
Suppose i have a record in database with id say, 12.
i have retrieved this using a JPQL query and convert it into a transfer object ,done
some processing and going to remerge this after converting it to a new entity but the id
set in the new entity is same as old one ie 12.
Now just before calling entityManger.merge i have deleted the record with id 12 from
database.
The issue is the merge opeartion is not inserting the record in database at all.
But if the id set in the entity is one which is never occured in the database,the merge
operation will insert the record with the id set from teh application.
Is there any work around/fix for this issue.
Regards
Harikrishnan R
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira