You should always rely on database sequencer. I hope that you are using EJBs
because you are in a concurrent enviroment. The value of the primary key
passed on create() method should be 0 or any other constant. create() method
will return the actual value of the primary key coming from the database.

Regards.

----- Original Message -----
From: "Benjamin Broll" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 31, 2001 2:33 PM
Subject: AW: Distribution of methods between EntityBeans


> Thanks all for your insights.
>
> I guess I will leave the design as it is right now and maybe add the
> addContentPK(), (...) methods suggested by Thibault. I will leave the
> setProject() method of ContentBean since I think that there will at least
be
> one guy who mumbles later on "Why didn't you support a setContent() on
> ContentBean itself - it would have been much more convenient" :)
>
> But I've got another question (which I forgot last time). In EntityBeans
> which have an Integer as their primary, do you think one should provide
this
> Integer on create()-time or do you think the autoincrement feature of
> databases should be used instead? To my mind it seems much more convenient
> to use the autoincrement feature because you can always rely on the
database
> providing a new valid Integer ... What do you think?
>
> So long,
>
> .bbr
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff EJB-INTEREST".  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 "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to