To my knowledge, Oracle and Informix both have facilities, albeit under
different names. I believe they called them "SEQUENCE" data types or something
like that.
DB2, on the other hand, doesn't, AFAIK.
Good luck,
-Ron
--- "John M. Jones" <[EMAIL PROTECTED]> wrote:
> Does your database support serial fields? These fields generate a counter
> for each record added. There's a trick to getting the next id when calling
> create(), but it eliviates coding a unique id generator. I use PostgreSQL,
> and it has a serial data type.
>
> Hope this helps,
> John
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Blasius Lofi
> Dewanto
> Sent: Thursday, June 15, 2000 5:13 AM
> To: [EMAIL PROTECTED]
> Subject: Automatic counter
>
>
> Hi all,
>
> I just wonder, whether someone can help me...
>
> How can I implement a counter or a unique id
> for my PrimaryKey in EJB? Because I don't want
> to take care about it in my EJB.
>
> Another question:
> When I quit from the EJBServer through the JonasAdmin,
> I always get this exception:
> Cannot unbind Datasources: java.lang.ClassCastException
> Is this normal?
>
> Thank's a lot!
> --
> ---------------------------------------------------
> Blasius Lofi Dewanto
> ---------------------------------------------------
> OpenUSS - Open Source University Support System
> http://openuss.sourceforge.net
> ---------------------------------------------------
>
>
> __________________________________________________________________
> Do You Yahoo!?
> Gesendet von Yahoo! Mail - http://mail.yahoo.de
> Yahoo! Auktionen - gleich ausprobieren - http://auktionen.yahoo.de
>
> ----
> To unsubscribe, send email to [EMAIL PROTECTED] and
> include in the body of the message "unsubscribe jonas-users".
> For general help, send email to [EMAIL PROTECTED] and
> include in the body of the message "help".
>
> ----
> To unsubscribe, send email to [EMAIL PROTECTED] and
> include in the body of the message "unsubscribe jonas-users".
> For general help, send email to [EMAIL PROTECTED] and
> include in the body of the message "help".
__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".