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



Reply via email to