title: How to reference custom type row in trigger
body: <p>I have created 2 custom types in SQL. The first one just a bare minimum type, for a concise example. </p>
  
  <pre><code>CREATE OR REPLACE TYPE TestType FORCE AS OBJECT
  (
      title VARCHAR(50)
  );
  /
  </code></pre>
  
  <p>The second type is a kind of log of the first type. This type is used to log changes of the first type.</p>
  
  <pre><code>CREATE OR REPLACE TYPE LogType FORCE AS OBJECT 
  (
    title VARCHAR(50),
    TestRef REF TestType
  );
  /
  </code></pre>
  
  <p>And the tables:</p>
  
  <pre><code>CREATE TABLE TestTable OF TestType;
  CREATE TABLE LogTable OF LogType;
  </code></pre>
  
  <p>The trigger:</p>
  
  <pre><code>CREATE TRIGGER UpdateLog
  BEFORE UPDATE OF title ON TestTable
  REFERENCING new as newrow old as oldrow
  FOR EACH ROW
  WHEN (newrow.title != oldrow.title)
  BEGIN
    INSERT INTO LogTable VALUES(:oldrow.title, :newrow);
  END UpdateLog;
  /  
  </code></pre>
  
  <p>Now, as mentioned before, I would like to have trigger on the TestTable, which would watch on row changes. The following part works, the problem happens when I want to insert the changes to the log table. Inserting null instead of the reference works, but trying to insert something similar to :newrow or ref(:newrow) does not do it. It throws a bad bind variable (PLS-00049).</p>
  
  <p>So the question is, how do i reference the newrow into the log table?</p>