Re: Problems with sequences

From: "Arturo Perez" <aperez(at)hayesinc(dot)com>
To: "Alban Hertroys" <alban(at)magproductions(dot)nl>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Problems with sequences
Date: 2006-09-07 14:16:03
Message-ID: 4AA304A4DBB6414199F18D7E324EBDE9016C0525@HAYES3.HAYESINC.ORG
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

From: Alban Hertroys [mailto:alban(at)magproductions(dot)nl]
>Arturo Perez wrote:
>> In any case, at this point in time it's looking like Cayenne doesn't honor
>> the rules of the sequence. It appears to (and is documented as) internally
>> incrementing rather than fetching the sequence for each insert.
>
>I have no experience with Cayenne, but reading
>http://cwiki.apache.org/CAYDOC/primary-key-generation.html it seems
>possible to use database sequences instead of Cayenne-generated ones:
>
>"... Generation mechanism depends on the DbAdapter used and can be
>customized by users by subclassing one of the included adapters."
>

Yes. I think I am being bitten by a desire to minimize changes required when migrating
from MySQL to PostgreSQL. Contrary to my belief, it appears that the pgSQL
schema creation script was not created by Cayenne configured to work with pgSQL but
rather was based on the script Cayenne used to create the MySQL database. Looks like I will
be uncovering nits as we go for a bit yet.

I did modify the sequences to increment by 20 as required by Cayenne. Hopefully,
this particular issue will be laid to rest by that.

thanks all,

-arturo

Browse pgsql-general by date

  From Date Subject
Next Message Dave Page 2006-09-07 14:26:54 Re: Majordomo drops multi-line Subject:
Previous Message Sim Zacks 2006-09-07 14:13:20 Re: Replace NULL values