Oracle APEX (24.1.6) | Oracle DB 19c
Hi, I'm trying to create a record from a form region. The form is tied to an old table for which I created a Primary Key using the following commands:
alter table my_table
add (id integer generated by default on null as identity);
alter table my_table
add constraint pk_my_table primary key (id);
I set the ID column as the PK in the Form. No other columns have been erroneously set as the PK. For the associated Process, I have the property “Return Primary Key(s) after Insert” set to True. The help for this property states:
Select whether the primary key column(s) should be returned to the corresponding region items once the row is inserted into the database. Generally, this option should be used when the primary key columns are populated from a database trigger or an Oracle Database 12 c Identity column.
Note - If an error is raised specifying that the RETURNING INTO clause is not allowed, you must set this option to No and pre-populate the primary key column(s).
However, when I go to create a record, I get the error “ORA-22816: unsupported feature with RETURNING clause”. I presume this is the error to which the help text is referring. In any case, I am using an Identity column so I should be able to set this property to True. I tried toggling the ID as “query only” as well, to no avail.
What am I missing or misunderstanding? I don't want to pre-populate the primary key column (ID) in APEX, since it does so automatically.