On Wed, Jan 17, 2001 at 12:16:01PM +0800, Wong Chee Mon wrote:
> I have a EntityBean, my question is
>
> how do I use this bean to create the next available primary id?
> ( the create method required a primary id)
> should I create a session bean to get the MAX id + 1 ?
>
> cmwong
>
cmwong,
If wrapped in a transaction, that would work -- but the performance would be
rather horrible -- the MAX query is fairly DB intensive and I wouldn't
recommend doing that in a transaction. I suggest you browse
http://www.theserverside.com/ for some in-depth discussions that have
already taken place on this topic.
Good luck,
Derek
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> List Help?: [EMAIL PROTECTED]
>
>
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]