Hi,
hope the below will help.
This will initially not work as described in my previous post.
Please observe the disparate foreign key constraints tagged with ***.
Code:
CREATE TABLE "KLAUZ"."MASTER" ("A" VARCHAR2(10 byte) NOT NULL,
"B" VARCHAR2(10 byte) NOT NULL, "C" LONG NOT NULL,
CONSTRAINT "MASTER_PK11177337506546" PRIMARY KEY("A")
USING INDEX
TABLESPACE "USERS"
STORAGE ( INITIAL 64K NEXT 0K MINEXTENTS 1 MAXEXTENTS
2147483645 PCTINCREASE 0) PCTFREE 10 INITRANS 2 MAXTRANS 255,
CONSTRAINT "MASTER_UK21177337506546" UNIQUE("B")
USING INDEX
TABLESPACE "USERS"
STORAGE ( INITIAL 64K NEXT 0K MINEXTENTS 1 MAXEXTENTS
2147483645 PCTINCREASE 0) PCTFREE 10 INITRANS 2 MAXTRANS 255)
TABLESPACE "USERS" PCTFREE 10 PCTUSED 0 INITRANS 1 MAXTRANS
255
STORAGE ( INITIAL 64K NEXT 0K MINEXTENTS 1 MAXEXTENTS
2147483645 PCTINCREASE 0)
LOGGING
CREATE TABLE "KLAUZ"."SLAVE" ("X" VARCHAR2(10 byte) NOT NULL, "Y"
VARCHAR2(10 byte) NOT NULL, "Z" LONG NOT NULL,
***
CONSTRAINT "SLAVE_FK81177337605734" FOREIGN KEY("Y")
REFERENCES "KLAUZ"."MASTER"("B"),
***
CONSTRAINT "SLAVE_PK11177337529750" PRIMARY KEY("X")
USING INDEX
TABLESPACE "USERS"
STORAGE ( INITIAL 64K NEXT 0K MINEXTENTS 1 MAXEXTENTS
2147483645 PCTINCREASE 0) PCTFREE 10 INITRANS 2 MAXTRANS 255)
TABLESPACE "USERS" PCTFREE 10 PCTUSED 0 INITRANS 1 MAXTRANS
255
STORAGE ( INITIAL 64K NEXT 0K MINEXTENTS 1 MAXEXTENTS
2147483645 PCTINCREASE 0)
LOGGING
Slightly modifying the dependent table's fk constraints and the generation will operate as expected (master ddl omitted / unchanged).
Code:
CREATE TABLE "KLAUZ"."SLAVE" ("X" VARCHAR2(10 byte) NOT NULL, "Y"
VARCHAR2(10 byte) NOT NULL, "Z" LONG NOT NULL,
***
CONSTRAINT "SLAVE_FK31177338173718" FOREIGN KEY("Y")
REFERENCES "KLAUZ"."MASTER"("A"),
***
CONSTRAINT "SLAVE_PK11177337529750" PRIMARY KEY("X")
USING INDEX
TABLESPACE "USERS"
STORAGE ( INITIAL 64K NEXT 0K MINEXTENTS 1 MAXEXTENTS
2147483645 PCTINCREASE 0) PCTFREE 10 INITRANS 2 MAXTRANS 255)
TABLESPACE "USERS" PCTFREE 10 PCTUSED 0 INITRANS 1 MAXTRANS
255
STORAGE ( INITIAL 64K NEXT 0K MINEXTENTS 1 MAXEXTENTS
2147483645 PCTINCREASE 0)
LOGGING
Take care,
Klaus