title: Call object member function in a DML trigger after update (ORACLE database)
body: <p>I have a database with a table <code>PRODUCTS</code> of objects <code>Product</code> where the <code>PRIMARY KEY</code> is the <code>EAN</code> field. Every time a row is updated I want to call a member function of the new object <code>Product</code> modified. I made this trigger:</p>
  
  <pre><code>CREATE OR REPLACE TRIGGER SHOW_PROFIT_PERCENTAGE
  AFTER UPDATE ON PRODUCTS
  FOR EACH ROW
  
  DECLARE
  
  P  Product;
  
  BEGIN
  
      SELECT VALUE(PS) INTO P
      FROM PRODUCTS PS
      WHERE EAN = :NEW.EAN;
  
      DBMS_OUTPUT.PUT_LINE('Profit percentage: ' || P.getProfit());
  
  END;
  </code></pre>
  
  <p>but when I update <code>PRODUCTS</code> it gives me this error:</p>
  
  <pre><code>table PRODUCTS is mutating, trigger/function may not see it
  </code></pre>
  
  <p>as I suspected. Is there a way to do that? Thanks!</p>