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
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
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.
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
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
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