Re: Auto-generated columns on Oracle

2019-07-15 Thread Arseni Bulatski
I've checked case of oracle auto-incremented columns in cayenne. To start use auto-incremented columns first need to set setSupportGeneratedKeys(true) in OracleAdapter, second have tables with auto-incremented columns in database. And it started to work. On Tue, Jun 4, 2019 at 5:45 PM John Huss w

Re: Auto-generated columns on Oracle

2019-06-04 Thread John Huss
Yep, Postgres. On Tue, Jun 4, 2019 at 9:43 AM Andrus Adamchik wrote: > Hmm.. In theory auto-pk should be compatible with batching. Is this on > PostgreSQL? > > Andrus > > > On Jun 4, 2019, at 5:39 PM, John Huss wrote: > > > > Just to follow up on this, after some experimentation it looks like u

Re: Auto-generated columns on Oracle

2019-06-04 Thread Andrus Adamchik
Hmm.. In theory auto-pk should be compatible with batching. Is this on PostgreSQL? Andrus > On Jun 4, 2019, at 5:39 PM, John Huss wrote: > > Just to follow up on this, after some experimentation it looks like using > PKs generated by the database can be much slower when doing bulk inserts, > b

Re: Auto-generated columns on Oracle

2019-06-04 Thread John Huss
Just to follow up on this, after some experimentation it looks like using PKs generated by the database can be much slower when doing bulk inserts, because Cayenne doesn't (can't?) do a batch bind to execute the inserts as a batch and instead has to execute them one by one. With a large batch of ro

Re: Auto-generated columns on Oracle

2019-05-29 Thread Sergey Baranov
> 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

Re: Auto-generated columns on Oracle

2019-05-29 Thread Hugi Thordarson
/me instantly starts modifying DBs. Thanks for pointing this out John! - hugi > On 29 May 2019, at 15:23, John Huss wrote: > > Doh! Turns out Cayenne already supports this for Postgres. Who knew! :-P > > 2621 [main] INFO org.apache.cayenne.log.JdbcEventLogger - INSERT INTO test > (payload)

Re: Auto-generated columns on Oracle

2019-05-29 Thread John Huss
Doh! Turns out Cayenne already supports this for Postgres. Who knew! :-P 2621 [main] INFO org.apache.cayenne.log.JdbcEventLogger - INSERT INTO test (payload) VALUES (?) 2621 [main] INFO org.apache.cayenne.log.JdbcEventLogger - [bind: 1->payload:'test'] 2632 [main] INFO org.apache.cayenne.log.

Re: Auto-generated columns on Oracle

2019-05-28 Thread Andrus Adamchik
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 wrote: > > Postgresql also r

Re: Auto-generated columns on Oracle

2019-05-28 Thread John Huss
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 st