[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2716) Session.replicate failure with identity column

Hans Loeblich (JIRA) noreply at atlassian.com
Tue Nov 23 18:16:13 EST 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=39193#action_39193 ] 

Hans Loeblich commented on HHH-2716:
------------------------------------

I too was bitten by this bug.  I ended up having to implement my own id generator class, basically a hybrid of org.hibernate.id.enhanced.SequenceStyleGenerator and org.hibernate.id.Assigned.  If an id is not assigned, then it generates one.  This was really suboptimal since I now have to create sequence tables for every table that I need to replicate across databases.  Replicate does not work as advertised, and it really cost me a lot of time figuring out a workaround.

> Session.replicate failure with identity column
> ----------------------------------------------
>
>                 Key: HHH-2716
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2716
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.2.2
>         Environment: Java 1.5, MySQL 5.0.27 and Hibernate Annotations 3.2.1.GA
>            Reporter: Yves Martin
>
> I'm trying to use replicate:
> http://www.hibernate.org/hib_docs/reference/en/html/objectstate.html#objectstate-replicating
> The column "@version" is replicated properly (same value in second db) but the column "@Id @GeneratedValue" contains a new value from the db2 sequence.
> In fact the insert statement generated by the replicate method does not include the "id" column.

-- 
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