Re: Problems with sequences - Mailing list pgsql-general

From Arturo Perez
Subject Re: Problems with sequences
Date
Msg-id 4AA304A4DBB6414199F18D7E324EBDE9016C0525@HAYES3.HAYESINC.ORG
Whole thread Raw
In response to Problems with sequences  ("Arturo Perez" <aperez@hayesinc.com>)
List pgsql-general
From: Alban Hertroys [mailto:alban@magproductions.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

pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Majordomo drops multi-line Subject:
Next
From: "Dave Page"
Date:
Subject: Re: Majordomo drops multi-line Subject: