cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harunobu Oyama ...@telensa.com>
Subject Re: auto PK generation in Cayenne 4 + PostgreSQL combination?
Date Thu, 28 Jul 2016 13:12:04 GMT
thanks Andrus!

nobu


On 28 July 2016 at 14:10, Andrus Adamchik <andrus@objectstyle.org> wrote:

> Back in the day PG driver did not support autoincremented values at the
> JDBC level. So we had to always revert to sequences.
>
> I'd like to run a test to see if it does now. If the test is successful,
> we can reconfigure Cayenne PostgresAdapter to enable aoto-increment
> strategy. Will keep the list posted.
>
> Andrus
>
>
> > On Jul 28, 2016, at 12:48 PM, Harunobu Oyama <ho@telensa.com> wrote:
> >
> > Hi,
> >
> >
> > What is the proper way to setup auto PK generation when Cayenne 4 +
> > PostgreSQL are in use?
> >
> > Suppose I have a simple table like this.
> >
> > create table "asset" (
> >  "asset_id" bigserial not null
> >  , "name" character varying not null
> >  , constraint "asset_PKC" primary key ("asset_id")
> > ) ;
> >
> > No matter how I configure the PK generation settings, it seems Cayenne
> > runtime
> > requires sequence named "pk_asset".
> >
> > Ideally we would like to automate the table-sequence combination by using
> > serial/bigserial.
> >
> > How can I tell Cayenne stop requiring "pk_asset"?
> >
> >
> > thank you,
> > nobu
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message