title: Virtual Column using deterministic user defined function
body: <p>I am using a virtual column (oracle 11g) with a deterministic user defined function which takes primary key of the row as parameter and returns a simple scalar value. the virtual columns updates without any problem but when i update the table it throws error:- <b>ora-00054 resource busy and acquire with nowait specified or timeout expired in oracle</b>. my table structure and the function, are as follows:-</p>
  
  <pre><code> -----------------------------------------------------------------------
     id   employee_name    employee_dept  employee_leaves (vir column)
   -----------------------------------------------------------------------
     2     patrick           mgmt         getEmpLeaves(id)  
     3      jack             sales            "
   -----------------------------------------------------------------------
  
       create or replace function getEmpLeaves(empId number) 
          return number 
            DETERMINISTIC
         is
             emp_leaves number;
         begin
             select leaves into emp_leaves from tbl_emp_leaves 
             where tbl_emp_leaves.id = empId;
             return emp_leaves;
        end ;
      -------------------------------------------------------------
  </code></pre>
  
  <p>How to overcome this error?</p>