The only way to do that is to use database-specific datatypes like
autonumber fields. These are not part of the SQL standard, so you loose
portability.

J.T. Wenting
http://www.hornet.demon.nl

all spam sent to this account will be reported to proper authorities


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Enrique
> Wallace
> Sent: Saturday, July 22, 2000 10:12 PM
> To: Orion-Interest
> Subject: EJB creation
>
>
> I've been learning EJB from Monson-Hefel's book and was
> pleased that i got
> the examples working and that i understood (most of) it.  I
> went on to try
> and create an EJB application of my own when I ran into a
> roadblock.  I
> realized in all the examples, when creating an entity bean,
> the app had to
> supply the primary key value.
>
> Is there a way to let the database take care of the primary key value
> creation?  I just want to create a new entity bean (and
> therefore a new
> record in the DB) without worrying about what its primary key
> should be.  i
> want to let the DB take care of that.  Can anyone help me
> with this?  is
> this process server specific or j2ee specified?  thanks for any help.
>
> ekw
>
> p.s. I must say this list has been very responsive to my
> questions.  other
> EJB servers i tried (jboss, for example) and where i have
> asked questions on
> their respective list have yielded almost nothing, probably
> because my
> questions are so newbie.  thanks!
>
> ______________________________________________________________
> __________
> Get Your Private, Free E-mail from MSN Hotmail at
> http://www.hotmail.com
>
>


Reply via email to