[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5814) set entity id for auto-generated id annotation
Dave (JIRA)
noreply at atlassian.com
Thu Dec 30 22:17:05 EST 2010
set entity id for auto-generated id annotation
----------------------------------------------
Key: HHH-5814
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5814
Project: Hibernate Core
Issue Type: Bug
Environment: ALL
Reporter: Dave
We need to copy data from one data source to another, and need keep same id to keep entity relations.
1. fetch entities from data source A
2. evict entities from session, set version to null, keep id not changed.
3. create entities in data source B.
for @GeneratedValue(strategy = GenerationType.AUTO), entity id is reset by Hibernate.
But for auto increment id in mysql, it can be set manually and AUTO_INCREMENT is automatically adjusted.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list