| Author |
Auto Generated Primary Key
|
John Rainey
Greenhorn
Joined: Dec 05, 2002
Posts: 17
|
|
I have a database table with 3 columns: 1. id 2. name 3. text The id - primary key - is being generated by the database as a sequential key. I'm confused about how to implement this field in my cmp entity bean. During the ejbCreate, I can't set the field since it's being generated by the database. thanks for your help.
|
 |
yc lim
Greenhorn
Joined: Jul 26, 2004
Posts: 14
|
|
try setting the value as null or 0, it works for me on MySQL
|
 |
Arun Prasath
Ranch Hand
Joined: Sep 17, 2003
Posts: 192
|
|
Hi, which application server are you using? I am using weblogic 6 sp3 and I am able to generate CMP on a table whose primary key is a sequence by mentioning its details in weblogic-cmp-rdbms-jar.xml Look into your application server's documentation.
|
SCJP 1.4, SCDJWS , SCJA<br />I can do ALL things through CHRIST who strengthens me.
|
 |
 |
|
|
subject: Auto Generated Primary Key
|
|
|