This is quite depressing considering that I need to hook to existing tables.
(I know, just don't use CMP). It seems to me that, similar to how we can
specify the SQL for finders, we should be able to specify SQL for ejbCreate
and ejbPostCreate.
Thanks for all the suggestions.
Shayne
----- Original Message -----
From: Mike Cannon-Brookes <[EMAIL PROTECTED]>
To: Orion-Interest <[EMAIL PROTECTED]>
Sent: Friday, April 07, 2000 10:40 PM
Subject: RE: CMP and Identity columns
> Shayne,
>
> As far as I know you cannot use identity (or autonumber fields) with EJBs.
> You have to create the primary key within Java.
>
> Anyone else?
>
> Mike
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Shayne Hughes
> > Sent: Saturday, 8 April 2000 9:38
> > To: Orion-Interest
> > Subject: CMP and Identity columns
> >
> >
> > I have a table on Microsoft SQL Server that has an identity column such
> > as...
> >
> > CREATE TABLE MyTable (
> > id int IDENTITY (1, 1) PRIMARY KEY NOT NULL ,
> > Name varchar (255) NULL
> > )
> >
> > I'd like to create a CMP EJB for this table. Is it possible to instruct
> > Orion to not specify a value for the "id" field when inserting a
> > new row and
> > to execute the proper SQL command to get back the "id" of the new row?
> >
> > My classes only have create methods that specify "Name". Here's
> > the message
> > from the exception that occurs...
> >
> > Error creating EntityBean: [ECOLI]Cannot insert explicit value
> > for identity
> > column in table 'GelGroup' when IDENTITY_INSERT is set to OFF.
> >
> > I hope this is on topic. My reseach points to this being a
> > container config
> > thing.
> >
> > Shayne
> >
> >
> >
> >
>
>