At 23:33 17.03.2003 -0800, Matthew Hixson wrote:
On Monday, March 17, 2003, at 09:38 PM, Eric Tim wrote:
I'm working on a CMP EntityBean with JBoss3 on Oracle8.
My primary key must be a unique number. Oracle has a nice facility for handling sequences, which doesn't seam possible with this senerio because i'd need to write some jdbc code in the ejbCreate method to get the nextval.
In Postgres we get the value for the PK from a sequence by doing the following.
create sequence manufacturers_sequence;
create table manufacturers(
manufacturer_id integer default nextval('manufacturers_sequence') primary key,
manufacturer_name varchar(100) not null);
Can you do something like that in Oracle when you create the table for the bean? Or are you letting JBoss create the table and it doesn't know how to put the 'default nextval...' snippet into the 'create table' command?
but after creating new entity bean with CMP you have to know your primary key. is this possible with JBoss 3.0.6?
rafal
-------------------------------------------------------
This SF.net email is sponsored by: Does your code think in ink? You could win a Tablet PC. Get a free Tablet PC hat just for playing. What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user
