I have an application in APEX (21.1.5). I have enabled Flashback Data Archive for a table. On the APEX side, I access a given record through a Form region. If I make a change to any of the fields, and then apply changes, I get a message “Row updated.”
Here is where my question arises. If I go back to a record, do NOT make any changes, but click apply changes anyway, I get rerouted back to my list page (according to my branch) but no such message “Row updated” appears. Notwithstanding, I get another version entry of the record in my Flashback Data Archive. The new version entry of the record does not show any changes from the prior version entry of the record. The snippet below shows what I am talking about (I am not going to show any of the data in my table itself, but I do show the VERSIONS_OPERATION
, VERSIONS_STARTTIME
, and VERSIONS_ENDTIME
):
These are sorted by VERSIONS_ENDTIME DESC
.
You can see that the last version entry (top row, has VERSIONS_ENDTIME
= NULL
) is showing an Update in VERSIONS_OPERATION
. But again, nothing has actually changed in any of the table columns… and the APEX interface reflected the fact than an update was NOT performed by not displaying a message “Row updated”.
Moreover, I have a trigger on this table that updates an UPDATE_WHEN
column to SYSDATE
. It looks like this (some logging provisions taken out for simplicity):
TRIGGER my_table_upd_set_audit_columns
BEFORE UPDATE ON my_table
FOR EACH ROW
BEGIN
:NEW.update_when := SYSDATE;
:NEW.update_by := v('APP_USER');
END;
And notably, not even this UPDATE_WHEN
column is showing a change. Here are the rows again, showing that column:
My question is, why is Flashback storing another version entry of the record simply because the user is pressing the save button? Based on the UPDATE_WHEN
column not being updated, it doesn't seem like an UPDATE
statement is even being triggered against the record at all, yet somehow Flashback wants to save another version entry.