Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] @SequenceGenerator initialValue on eclipselink.ddl-generation is ignored

Hi..

I'm using JPA 2.0 on Glassfish v3.0.
I'm running Postgresql 8.4 and postgresql-8.4-701.jdbc4 JDBC Driver on
JDK 6 and Vista.

I've found a problem that might be a bug.
When I'm using initialValue on @SequenceGenerator annotation and use
eclipselink.ddl-generation (create-tables) on persistence.xml, the
generated sequence always ignore the initialValue attribute.

This is my annotation:
@SequenceGenerator(name="RoleSeq",sequenceName="seq_role",initialValue=10000)
@Id @GeneratedValue(generator="RoleSeq")
@Column(name="id")
private Long id;

And this is the generated sequence: (start value is always 50, not 10000)
CREATE SEQUENCE seq_role
  INCREMENT 50
  MINVALUE 1
  MAXVALUE 9223372036854775807
  START 50
  CACHE 1;

Does anyone experience this problem?
Should I report this as a bug?

Thanks...


Back to the top