Re: Identity PK value

2007-06-15 Thread Mike Kienenberger
Another possibility might be to remove the column from being auto-generated by Cayenne, and manually set the primary key value as a normal attribute. On 6/15/07, Andrus Adamchik <[EMAIL PROTECTED]> wrote: On Jun 15, 2007, at 4:56 PM, Marc Gabriel-Willem wrote: > I would like to have the PK va

Re: Identity PK value

2007-06-15 Thread Andrus Adamchik
On Jun 15, 2007, at 4:56 PM, Marc Gabriel-Willem wrote: I would like to have the PK value before the commit ! Is there any way to do that ? Unfortunately no, as JDBC driver returns it only after the row is inserted. If what you want to do is modify this or some other object in the same t

RE: Identity PK value

2007-06-15 Thread Marc Gabriel-Willem
Yes, it is autogenerated by the DB. I'm using MS SQLServer. In fact, I would like to have the PK value before the commit ! Is there any way to do that ? Thank you Marc -Original Message- From: Andrus Adamchik [mailto:[EMAIL PROTECTED] Sent: Friday, June 15, 2007 3:48 PM To: user@cayenne.

Re: Identity PK value

2007-06-15 Thread Andrus Adamchik
BTW, is "identity column" autogenerated by DB by any chance? And which DB is that? Maybe you can use this mechanism: http://cayenne.apache.org/doc20/generated-columns.html Andrus On Jun 15, 2007, at 4:32 PM, Mike Kienenberger wrote: It's relatively easy to build your own custom PK gener

Re: Identity PK value

2007-06-15 Thread Mike Kienenberger
It's relatively easy to build your own custom PK generator, using whatever logic you want. Take a look at the various database implementations for examples, such as the OpenBase one. On 6/14/07, Marc Gabriel-Willem <[EMAIL PROTECTED]> wrote: Dear all, We have a problem regarding the PK value

Fwd: Call for Papers Opens for OS Summit Asia 2007

2007-06-15 Thread Andrus Adamchik
FYI: this is a call for papers for the joint Apache/Eclipse conference in Hong Kong this November. If somebody wants to make a Cayenne presentation, note that the speaker expenses are covered up to $1300, and this is a chance for you to visit Hong Kong :-) Andrus