Support for initialValue of @SequenceGenerator

Description

AllocationSize resolved in

Activity

Show:

Emmanuel Bernard June 2, 2009 at 5:55 PM

yes eventually but that will break applications so we need to think it through

Peter Kamm June 2, 2009 at 4:13 PM

Why does this not work (Standard JPA Annotation):
@SequenceGenerator(name = "GEN_SEQ_GEN", sequenceName = "XY_SEQ",
allocationSize = 100, initialValue = 1000000)

If this works (Hibernate dependent)
@GenericGenerator( name = "GEN_SEQ_GEN",
strategy = "org.hibernate.id.enhanced.SequenceStyleGenerator",
parameters = {
@Parameter(name = "sequence_name", value = "XY_SEQ"),
@Parameter(name = "initial_value", value = 1000000),
@Parameter(name = "increment_size", value = 100)
}
)

Could the enhanced SequenceStyleGenerator not be used for standard JPA so that the allocationSize works correct (also for
DDL Generation)?

Emmanuel Bernard July 7, 2005 at 1:35 AM

check for a patch in JIRA for that kind of support

Out of Date

Details

Assignee

Reporter

Components

Priority

Created December 29, 2004 at 8:18 PM
Updated September 22, 2022 at 4:26 PM
Resolved September 22, 2022 at 4:26 PM