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

Hi,

Thanks 4 the confirmation..
I've created bug ticket at https://bugs.eclipse.org/bugs/show_bug.cgi?id=311328

Regards,
Yohan Yudanara

On Mon, May 3, 2010 at 4:18 AM, Frank Schwarz <fs5@xxxxxxx> wrote:
>
> Hi,
>
> I tested your scenario and at least for the postges-dialect I can confirm
> the observed behavior. EclipseLink ignores the initialValue-setting and only
> honors the allocationSize-value. It simply takes the allocationSize-value
> for the MINVALUE-setting.
>
> -- Frank
>
>
> 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..
>>
>>
>>
>> On Fri, Apr 30, 2010 at 8:14 PM, Andrei Ilitchev
>> <andrei.ilitchev@xxxxxxxxxx> wrote:
>>> 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"
>>>
>>>> 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
>>
>>
>
> --
> View this message in context: http://old.nabble.com/%40SequenceGenerator-initialValue-on-eclipselink.ddl-generation-is-ignored-tp28408270p28429557.html
> Sent from the EclipseLink - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>


Back to the top