I am using EntityDeveloper 5.5.120 and DotConnect for Oracle. My approach is to create a model first entity database. Here is my Problem:
> The auto-increment (seqneces and triggers in oracle) statements are only generated for the first table that is using identity primary key generation <
When i add another table by copy and pasting the first one with exact the same attributes, the SQL squence and trigger statements for the identity column are missing. I cant figure out why nor do I know a proper woraround. Unfortunately this leads to unresovable problems:
Code: Select all
ORA-01400: cannot insert NULL into ("WILL"."CLASS2"."PROPERTY2")
Code: Select all
--
-- Creating a table "will".CLASS2S
--
CREATE TABLE "will".CLASS2S (
PROPERTY2 NUMBER(10) NOT NULL,
CONSTRAINT PK_CLASS2S PRIMARY KEY (PROPERTY2)
);
--
-- Creating a table "will".CLASS1S
--
CREATE TABLE "will".CLASS1S (
PROPERTY1 NUMBER(10) NOT NULL,
CONSTRAINT PK_CLASS1S PRIMARY KEY (PROPERTY1)
);
--
-- Creating a sequence "will"."AI$CLASS1S_PROPERTY1_seq"
--
CREATE SEQUENCE "will"."AI$CLASS1S_PROPERTY1_seq" START WITH 1 INCREMENT BY 1;
--
-- Creating a trigger "will".AI$CLASS1S
--
CREATE OR REPLACE TRIGGER "will".AI$CLASS1S
BEFORE INSERT ON "will".CLASS1S
FOR EACH ROW
BEGIN
SELECT "will"."AI$CLASS1S_PROPERTY1_seq".NEXTVAL INTO :NEW.PROPERTY1 FROM DUAL;
END;
regards,
Will