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
>
>
>
>