yea sure! i'm glad! =D
i'm a newbie and currently, i use findAll() function
then get the last item from the collection, then get
pk field from the item then pk-field + 1. i think my
approach is slow, dont u think?
-L. Yeung
Message: 11
Date: Mon, 09 Jul 2001 16:34:52 +1000
To: [EMAIL PROTECTED]
From: Devraj Mukherjee <[EMAIL PROTECTED]>
Subject: Re: [JBoss-user] Auto-Incr
Reply-To: [EMAIL PROTECTED]
Hi,
I solved this problem by creating the table with a
normal integer as
the
primary key and then writing a AutoNumberBean. The
AutoNumberBean is
another CMP bean which just keeps track of an Integer
per table. If you
want I can send you the code for it as well.
Devraj
At 23:15 8/07/01 -0700, you wrote:
>i'm using mysql for my database and created an
>auto-incrementing pk on a table. i wrote an entity
>bean which creates a row having a pk value of 0
>"zero". mysql maps the value of 0 "zero" to the
>last-pk-value + 1. however, when i retrieve my data
>through ejb, the pk still contains 0 "zero". im using
>jboss as my ejb-container. any help is gladly
>appreciated.
>
>-L. Yeung
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user