Re: Problems with sequences

Поиск
Список
Период
Сортировка
От Arturo Perez
Тема Re: Problems with sequences
Дата
Msg-id 4AA304A4DBB6414199F18D7E324EBDE9016C0525@HAYES3.HAYESINC.ORG
обсуждение исходный текст
Ответ на Problems with sequences  ("Arturo Perez" <aperez@hayesinc.com>)
Список 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 по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Majordomo drops multi-line Subject:
Следующее
От: "Dave Page"
Дата:
Сообщение: Re: Majordomo drops multi-line Subject: