yiisoft/yii — Issue #399: Error in create option for CRUD generator
Author: edisnake
Created: 2012-02-24 19:50:39+00:00
State: open

Hi, i´m using a oracle 10g database and when i try to create a register in a simple table (with no relations with others tables only primary key and other filed) the program says:

"CDbException CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1400 OCIStmtExecute: ORA-01400: cannot insert NULL into ("RECA"."RECA_P_UEBA"."ID")
(/home/nalwalovaton/Downloads/php5/php-5.3.3/ext/pdo_oci/oci_statement.c:146). The SQL statement executed was: INSERT INTO "RECA_P_UEBA" ("DESCRIPCION") VALUES (:yp0) RETURNING "ID" INTO :RETURN_ID" how you see the id field does not appear in the insert sql.... please fix this problem in order to use Yii, because i like this framework

the table script is

CREATE TABLE RECA_P_UEBA
(
ID NUMBER(5),
DESCRIPCION VARCHAR2(500 BYTE)
);

ALTER TABLE RECA_P_UEBA ADD (
CONSTRAINT RECA_P_UEBA_PK
PRIMARY KEY (ID));

Thanks for your help