APEX 19.1 on RDBMS 12.2
Got a page with a form on a table. When I call the page with the form I pass the primary key P164_PERSON_PII_ID from the calling page. Right now if no row currently exists, I pass NULL. So the form works fine for an UPDATE - it got the primary key from the calling page, displays the current data, lets me change it, and saves changes when I submit the page.
But if the primary key was NULL - i.e. I intend this to be an INSERT, it brings up the fields as blank as I expect, I can fill them in as I expect, but when I submit the page, I get an ORA-01403, no data found. I suspect that it is trying to lock the row with PERSON_PII_ID = NULL, and of course there is no row like that. Debug shows the error, shows that it happens during standard form DML process, but doesn't show the SQL that caused the error.
So how do I add a new row from this form with no attempt to lock?