title: Why can't we apply @ColumnTransformer to @Id (primary key) field?
body: <p>I use Hibernate’s @ColumnTransformer to map an encrypted database column to an entity attribute.</p>
  
  <pre><code>@ColumnTransformer(
          read =  "pgp_sym_decrypt(refresh_token::bytea, 'mykey or obfuscated key from keystore')",
          write = "pgp_sym_encrypt(?, 'mykey or obfuscated key from keystore')"
  )
  @Column(name="refresh_token")
  private String refreshToken;
  </code></pre>
  
  <p>I decided to use refresh token as primary key (is it bad idea?) and update table row with new access token.
  But it will not work with encoded primary key.</p>
  
  <p>Why can't we apply @ColumnTransformer to @Id (primary key) field?</p>