For my project I need to define an auto incrementing ID field for several tables of my model. I obviously needed a sequence for each and I was looking for a way to define it in the Data Modeler.
Oracle Data Modeler allows you to mark any column field as auto-incrementing. Select the table in your model and double click on the column. In the example below, I want the primary key field to be auto-incrementing.
If you check the DDL you will see the code for the sequence and the trigger that is fired whenever a new line is inserted into the table.
CREATE SEQUENCE CNE_CNEIDE_SEQ
CREATE OR REPLACE TRIGGER CNE_CNEIDE_TRG
BEFORE INSERT ON T_CANAL_ENTRADA
FOR EACH ROW
WHEN (NEW.CNEIDE IS NULL)
SELECT CNE_CNEIDE_SEQ.NEXTVAL INTO :NEW.CNEIDE FROM DUAL;
If you don't need the trigger, just untick the option in the Auto Increment panel.