Hi,
On 2001.06.08 10:43:13 -0400 Nicolai P Guba wrote:
> Simple question (I hope):
>
> If I'd like to use CMP for a project. mySQL supports auto-generating
> the primary key for an inserted row (AUTO_INCREMENT). Is this feature
> supported by jboss?
No. There is extremely extensive discussion of this in the archive.
>
> If not, what strategy would you recommend for handling primary keys
> (never done it any other way but to rely upon the database to generate
> the value).
I think the easiest is to get the new key value from the db before you
start the insertion process. One way is through a session bean. If mySQL
only supports autoincrement rather than generators(interbase/firebird) or
sequences(oracle) you will have to create a 1-column table for each key
sequence you want.
david jencks
>
>
> --
> Nicolai P Guba http://www.gnu.org http://www.frontwire.com
> mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
> GSM: +44 (0)7909 960 751 DDI: +44 (0)20 7368 9708
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user