Skip to main content

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

May be the sequence with start 50 already exists in the db?
Either drop the sequence from the db "by hand", or alternatively use "drop-and-create-tables" instead of "create-tables" ----- Original Message ----- From: "Yohan Yudanara" <yohan.yudanara@xxxxxxxxx>
To: <eclipselink-users@xxxxxxxxxxx>
Sent: Thursday, April 29, 2010 11:45 PM
Subject: [eclipselink-users] @SequenceGenerator initialValue oneclipselink.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...
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users




Back to the top