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

Oops, seems we are generating the DDL correctly, but not passing the value
from the annotation correctly.  It is a bug.



James Sutherland wrote:
> 
> I can't see how this is possible.  The code (at least in 2.0) will always
> generate the DDL,
> 
> CREATE SEQUENCE <name> INCREMENT BY <increment> START WITH <start>
> 
> EclipseLink is not generating your code, maybe your application is.  Turn
> on logging to fine or finest to get the log of what EclipseLink is
> generating.
> 
> If the sequence already exists, then EclipseLink will not replace it. 
> This may be what you are seeing.
> 
> Or perhaps you have customized your PostgreSQL platform, or are using a
> different version?
> 
> 
> 
> Yohan Yudanara-2 wrote:
>> 
>> Hi,
>> 
>> Thanks 4 the response, but maybe my question is not clear.
>> btw, the sequence is not already exist on the database.
>> 
>> I want eclipselink.ddl-generation to generate sequence for me starting
>> with value *10000*.
>> I'm using this annotation to do that:
>> @SequenceGenerator(name="RoleSeq",sequenceName="seq_role",initialValue=10000)
>> 
>> But, the generated sequence is start with 50:
>> CREATE SEQUENCE seq_role
>> INCREMENT 50
>> MINVALUE 1
>> MAXVALUE 9223372036854775807
>> START **50**
>> CACHE 1;
>> 
>> instead of start with 10000 (I expect 10000 because I've use
>> initialValue=10000 on my annotation)
>> CREATE SEQUENCE seq_role
>> INCREMENT 50
>> MINVALUE 1
>> MAXVALUE 9223372036854775807
>> START **10000**
>> CACHE 1;
>> 
>> Is this an eclipselink bug? or is this my fault to not understand what
>> "initialValue" means ?
>> Plz help..
>> 
>> Thanks..
>> 
>> 
> 
> 


-----
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
-- 
View this message in context: http://old.nabble.com/%40SequenceGenerator-initialValue-on-eclipselink.ddl-generation-is-ignored-tp28408270p28449434.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top