title: Hibernate execute IN query on an enum data type column
body: <p>Currently, I have a table that has a column which has a datatype enum. My question is can I execute a IN query on this column?</p>
  
  <p>For example:</p>
  
  <pre><code>enum Gender { MALE, FEMALE, GAY };
  Table Student (
    String name;
    Gender gender;
  )
  </code></pre>
  
  <p>Can I execute: </p>
  
  <pre><code>SELECT * FROM Student WHERE gender IN ('MALE', 'FEMALE');
  </code></pre>
  
  <p>Note that I use string as the parameter for in, but I'm getting:</p>
  
  <pre><code>Caused by: java.lang.IllegalArgumentException: Parameter value [('MALE')] did not match expected type [Gender]
  </code></pre>
  
  <p>Is there a workaround on this issue?</p>
  
  <p>Thanks,
  <br />czetsuya</p>