APEX 18.2
When an IG region query uses a pipelined function, even when the columns returned by the function are not editable (i.e. Query Only = Yes), the IG save (both custom as well as out-of-the-box) throws ORA-29915 cannot select FOR UPDATE from collection operand error because it attempts to wrap the region query in a FOR UPDATE NOWAIT.
One solution is to turn off the Lock Row region attribute but this would not be wise in a multi-user environment as this article shows.
The other solution is to use Custom PL/SQL code to lock the row using the example shown in the inline help e.g.
PL/SQL Code to Lock Row
Enter the PL/SQL code to lock the database table rows to be updated and deleted.
Examples
declare l_dummy number; begin select 1 into l_dummy from emp where empno = :EMPNO for update nowait; end;
Questions
- Is this code executed to lock each row before updating or deleting it?
- Does this work with a custom PL/SQL code to save the IG using APEX$ROW_STATUS and such?
- Does the locking code have access to all IG columns using :COL notation?
Pretty sure the answer to all 3 questions is Yes but just wanted someone to confirm.
Thanks