Hi all!
I use orion 1.4 with Oracle 8.1.7 and encounter the next problem:
I have some table like next:
CREATE TABLE T (
  ID NUMBER(10,0) PRIMARY KEY NOT NULL,
  NAME VARCHAR2(50) NOT NULL)
/

I have a CMP bean with two fields is id name mapped to table T ID and NAME
columns respectively. The home interface has the only create method with
two parameters - one int and one String, so I have one ejbCreate method
with two parameters corresponding to Home create method. Deployment is
nice. But when I try to call a create method on home interface from client
I encounter a ORA-01400 cannot insert NULL into error. It's look like orion
generate the next code (SQL):
INSERT INTO T (ID) VALUES (?)
set it, execute it and then
UPDATE T SET NAME = ? WHERE ID = ?

When I comment NOT NULL constraint for NAME column all works fine. It may
be solution for new application with the only access via EJB, but what to
do if a have an old system which relay on DB integrity constraints and need
to add new EJB application?
Is there any way to say orion that "name" field must present?
Thank in advance,
Alexey Ryndin.



Reply via email to