title: Audit Logging skips logging ID of tables with composite-primary key
body: <p>I'm implementing <a href="https://grails.org/plugin/audit-logging?skipRedirect=true" rel="nofollow noreferrer">Audit Logging 1.1 Grails Plugin</a> to track the changes to my domain classes midway of our project implementation. These are an example domain object for our scenario:</p>
  
  <blockquote>Students need to answer questions. A question can ask for a single or a multiple answers.</blockquote>
  
  <pre><code>class Question {
      static auditable = true
  
      Integer id
      String content
  
      static hasMany = [
          answers: Answer
      ]
  }
  
  class Student {
      static auditable = true
  
      Integer id
      String name
  
      static hasMany = [
          answers: Answer
      ]
  }
  
  class Answer implements Serializable {
      static auditable = true
  
      Integer sequence
      String value
  
      static belongsTo = [
          student: Student,
          question: Question
      ]
  
      static mapping = {
          id composite: ["student", "question", "sequence"]
      }
  }
  </code></pre>
  
  <p>Every time I perform insert/updates to any of these tables, the plugin fires an event and logs it to my <code>AuditLog</code> table. All <code>DML</code> are successfully logged as expected except for the <code>Answer</code> table. The problem is that the <code>PERSISTED_OBJECT_ID</code> is always null:</p>
  
  <pre><code>+----+---+------------+------------+---------------------+---------------+-----------+-----------+
  | ID | … | CLASS_NAME | EVENT_NAME | PERSISTED_OBJECT_ID | PROPERTY_NAME | OLD_VALUE | NEW_VALUE |
  +----+---+------------+------------+---------------------+---------------+-----------+-----------+
  | …  | … | Answer     | UPDATE     |                     | value         | A         | B         |
  | …  | … | Answer     | UPDATE     |                     | value         | B         | A         |
  +----+---+------------+------------+---------------------+---------------+-----------+-----------+
  </code></pre>
  
  <p>I tried to include the <code>logIds = true</code> config but it still not persisting. Without that column, I cannot identify which <code>Answer</code> is updated by whom. I'm expecting that this would be the case of all the composite primary keys domain classes that I have.</p>
  
  <p>What can I do to fix this?</p>