title: Is there a way to escape "size" property name in HQL?
body: <p>Consider a Cat entity like this (pseudocode):</p>
  
  <pre><code>@Entity
  class Cat {
      @Id
      Long id;
  
      @Column
      String name;
  
      @Column
      String size; /* may be "BIG", "SMALL", "TINY" see (1) */
  
      @OneToMany
      List&lt;Cat&gt; offsprings;
  }
  </code></pre>
  
  <p>This HQL query, which searches by 'TINY' sized kittens</p>
  
  <pre><code>from Cat c join c.offsprings o where o.size = 'TINY'
  </code></pre>
  
  <p>will blow up with</p>
  
  <blockquote>
    <p>ERROR: invalid input syntax for integer: "TINY"</p>
  </blockquote>
  
  <p>because <code>size</code> is a special property name, which will, in this case, count number of cats' offsprings.</p>
  
  <p>In a scenario like this, is there a proper way to make Hibernate treat <code>o.size</code> (or possibly <code>o.class</code> and others) as a regular property name?</p>
  
  <hr>
  
  <p>(1) I'm not an author of this regrettable design, nor do I condone it. However, I'm not in position to modify it at this moment.</p>