[hibernate-issues] [Hibernate-JIRA] Created: (EJB-268) Table generates id which are too low by 1

Oliver Brandt (JIRA) noreply at atlassian.com
Wed Feb 14 07:59:40 EST 2007


Table generates id which are too low by 1
-----------------------------------------

         Key: EJB-268
         URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-268
     Project: Hibernate Entity Manager
        Type: Bug

  Components: EntityManager  
    Versions: 3.2.1    
    Reporter: Oliver Brandt


The org.hibernate.id.MultipleHiLoPerTableGenerator uses the configred table and column to store the next id to be used, while the EJB spec states, the configured table and column holds the last value used. 
As the HEM uses org.hibernate.id.MultipleHiLoPerTableGenerator behaviour, the id for the next entity to be persisted is fetched from the column and not incremented before it is assigned to that entity. Therefore the generated id is off by 1.

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