users@glassfish.java.net

Re: I am using JPA and I am using _at_GeneratedValue(strategy = GenerationType.AUTO) but it does not increment correctly

From: Sarah kho <sarah.kho_at_gmail.com>
Date: Wed, 5 Aug 2009 14:15:18 +0430

Hi, yes brought down the application.
Is there anyway to disable the cache?
Thanks

On Wed, Aug 5, 2009 at 5:31 AM, Mitesh Meswani <Mitesh.Meswani_at_sun.com>wrote:

> Sarah kho wrote:
>
>> Hi
>> Thank you for reading my post.
>> I am using JPA and I am using the follwing notation for my key field.
>> @Id
>> @GeneratedValue(strategy = GenerationType.AUTO)
>> private Long id;
>>
>> problem is that records in the database do not have correctly sequenced ID
>> values. for exaple the first record is 3 and the second record is 53, is
>> there any way that I can fix it?
>>
> Did you bring down the application between two runs? Toplink Esseentials by
> default caches 50 ids at a time.
>
> -Mitesh
>
>> My database is MySQL and I am using Toplink Essential.
>> Thanks.
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>