You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Germán Mondragón <ge...@welinux.cl> on 2008/12/05 13:51:01 UTC

Sequence postgres.

Hello,
We need to know how to set the Cayenne with postgres to always make an insert realize a nextval on the sequence postgres.

thank

Re: Sequence postgres.

Posted by Andrus Adamchik <an...@objectstyle.org>.
Pierre is absolutely right. PostgreSQL will work the same way as  
Oracle in this respect. "Default" strategy is based on Cayenne- 
generated PK sequences with a step of 20, but you can change that with  
"Custom Sequence" strategy.

Andrus


On Dec 5, 2008, at 3:14 PM, Pierre Lavignotte wrote:

> Hello,
>
> With Oracle, you have to set the PK generation strategy to "Custom  
> sequence"
> and the "Cache PK Size" to 1.
>
> Guess it will be the same with Postgres.
>
> Pierre
>
> On Fri, Dec 5, 2008 at 1:51 PM, Germán Mondragón <ge...@welinux.cl>  
> wrote:
>
>> Hello,
>> We need to know how to set the Cayenne with postgres to always make  
>> an
>> insert realize a nextval on the sequence postgres.
>>
>> thank
>>
>
>
>
> -- 
> Cordialement,
> Pierre Lavignotte
> Ingénieur Conception & Développement
> http://pierre.lavignotte.googlepages.com


Re: Sequence postgres.

Posted by Pierre Lavignotte <pi...@gmail.com>.
Hello,

With Oracle, you have to set the PK generation strategy to "Custom sequence"
and the "Cache PK Size" to 1.

Guess it will be the same with Postgres.

Pierre

On Fri, Dec 5, 2008 at 1:51 PM, Germán Mondragón <ge...@welinux.cl> wrote:

> Hello,
> We need to know how to set the Cayenne with postgres to always make an
> insert realize a nextval on the sequence postgres.
>
> thank
>



-- 
Cordialement,
Pierre Lavignotte
Ingénieur Conception & Développement
http://pierre.lavignotte.googlepages.com