Book a Demo

Author Topic: Separation of Triggers / Sequences in DDL  (Read 2285 times)

bernhard795

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Separation of Triggers / Sequences in DDL
« on: November 08, 2006, 07:08:57 am »
Hi Folks,

I'm currently facing a problem regarding the DDL created for dealing with Auto Number columns using Oracle DBMS.

For each Auto Number Column EA creates a "create sequence / create trigger pair" in the "Create Triggers" section of the DDL script. Those pairs should be separated by a slash followed by at least one line break. Sadly the line break is missing, which makes oracle creating only the first sequence / trigger pair.

Example:
Code: [Select]

[...]--  Create Triggers
CREATE SEQUENCE Table1_TabID_SEQ
increment by 1
start with 1
NOMAXVALUE
minvalue 1
nocycle
nocache
noorder;

CREATE OR REPLACE TRIGGER SET_Table1_TabID
BEFORE INSERT
ON Table1
FOR EACH ROW
BEGIN
 SELECT Table1_TabID_SEQ.NEXTVAL
 INTO :NEW.TabID
 FROM DUAL;
END;
/CREATE SEQUENCE Table2_TabID_SEQ
increment by 1
start with 1
NOMAXVALUE
minvalue 1
nocycle
nocache
noorder;

CREATE OR REPLACE TRIGGER SET_Table2_TabID
BEFORE INSERT
ON Table2
FOR EACH ROW
BEGIN
 SELECT Table2_TabID_SEQ.NEXTVAL
 INTO :NEW.TabID
 FROM DUAL;
END;
/CREATE SEQUENCE [...]


Question: Is there a way to override / change the template used for this? I've seen the Menu Settings -> Code Generation Templates, but there's no possibility to change templates for DDL. I'm using EA 6.0 (778).

Thanks in advance and best regards
 Bernhard
« Last Edit: November 08, 2006, 07:09:34 am by bernhard795 »

hd

  • EA Administrator
  • EA User
  • *****
  • Posts: 312
  • Karma: +0/-0
    • View Profile
Re: Separation of Triggers / Sequences in DDL
« Reply #1 on: November 08, 2006, 01:19:40 pm »
Upgrade to the latest release.  :)