cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Baranov <baras...@gmail.com>
Subject Re: Auto-generated columns on Oracle
Date Thu, 30 May 2019 04:26:08 GMT
> Creating extraneous objects in DB for the sake of PK generation feels old.

oracle doing just that with its "new autoincremented columns" feature. It
is just a implicitly created sequence with some cumbersome name. There were
some issues our dba had with cloning databases - these sequences could have
different names or values on source and
destination bases.

So it is just syntax sugar and as always with new and shiny oracle database
features (virtual columns, advanced queues etc.) it is more robust not to
rely on it.



вт, 28 мая 2019 г., 20:30 Andrus Adamchik <andrus@objectstyle.org>:

> Thanks for the pointer. If PG passes generated PK back through the JDBC
> driver and we can read it after an INSERT, we most definitely should.
> Creating extraneous objects in DB for the sake of PK generation feels old.
>
> Andrus
>
> > On May 28, 2019, at 6:47 PM, John Huss <johnthuss@gmail.com> wrote:
> >
> > Postgresql also recently improved their support in this area (in version
> > 10). It's more like syntactic sugar on top of things you could already
> do,
> > but I'd be interested to know if it can be used by Cayenne in the same
> way
> > as the MySQL auto-increment columns.
> >
> > The DDL syntax is supposedly an SQL standard:
> >
> > CREATE TABLE test_new (
> >    id int GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
> >    payload text
> > );
> >
> >
> > On Mon, May 27, 2019 at 1:49 AM Andrus Adamchik <andrus@objectstyle.org>
> > wrote:
> >
> >> Looks like Oracle started supporting auto-increment columns since 12c:
> >>
> >>
> >>
> https://www.arungudelli.com/tutorial/oracle/auto-increment-identity-column-in-oracle-table-primary-key/
> >>
> >> We should try using that in the adapter.
> >>
> >> Andrus
>
>

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