Re: primary key in transaction

2017-11-27 Thread Amedeo Mantica
The option 2 looks like exactly what I want, I'm going to try Thank you ! Amedeo > On 27 Nov 2017, at 07:05, Andrus Adamchik wrote: > > Hi Amedeo, > > I assume you want to know the PK before commit (as otherwise Cayenne would > handle that for you transparently). In which case you have two op

Re: primary key in transaction

2017-11-26 Thread Andrus Adamchik
Hi Amedeo, I assume you want to know the PK before commit (as otherwise Cayenne would handle that for you transparently). In which case you have two options: 1. Map a meaningful PK, and just call a setter on the object with whatever meaningful value you might have. 2. Use PkGenerator and set t

primary key in transaction

2017-11-24 Thread Amedeo Mantica
Hi all, Do you know how to obtain the primary key for a newly created object ? On EOF there were the method EOAdaptorChannel.primaryKeysForNewRowsWithEntity mostly user by higher level Wonder method eo.primaryKeyInTransaction() Anything similar in Cayenne ? Thank you Amedeo