i think it'd be auto-id itself
--hermann
- Original Message -
From:
Frank Villarreal
To: [EMAIL PROTECTED]
Sent: Thursday, July 26, 2001 5:23
PM
Subject: RE: [JBoss-user]
Auto-increment(revisited) : read on jGuru.
Assuming the auto-id is your primary key, what would
you use as the entity bean's primary key?
Frank T. Villarreal, Jr. Email [EMAIL PROTECTED]
-Original Message-From: Hermann RANGAMANA [mailto:[EMAIL PROTECTED]]Sent:
Thursday, July 26, 2001 9:32 AMTo: [EMAIL PROTECTED]Subject:
[JBoss-user] Auto-increment(revisited) : read on jGuru.
Hi all,
while we all in this list have debated about
the best way to have an Autoincrement-like feature in our EJB (using
AutoNumber bean, using a singleton session bean to retrieve the newly
created id in the db, etc.), i've just came through a text at jGuru - in FAQ
section about EJB - about a fairly simple way to handle auto-incr with CMP.
I'd just like want to know if anyone has tested the suggested method, and if
it works correctly with jBoss
Any comment would be higly
appreciated.
--hermann
From jGuru :
Question
How does Container
Managed Persistence work with automatically generated database ID
fields? Should I map the ID field explicitly or leave it unspecified?
Answer In the Deployment Descriptor,
map the normal fields appropriately, but don't specify the auto-id field as
one of the container managed fields.
Link : http://www.jguru.com/faq/view.jsp?EID=33146