title: Problems with making a query when using Enum in entity
body: <p>I have the following in a Question entity:</p>
  
  <pre><code>@NamedQuery(name = "Question.allApproved",
      query = "SELECT q FROM Question q WHERE q.status = 'APPROVED'")
  </code></pre>
  
  <p>and</p>
  
  <pre><code>@Enumerated(EnumType.STRING)
  private Status status;
  
  // usual accessors
  </code></pre>
  
  <p>I am getting this exception:</p>
  
  <blockquote>
    <p>Exception Description: Error compiling the query
    [Question.countApproved: <code>SELECT COUNT(q) FROM Question q WHERE q.status = 'APPROVED'</code>], line 1, column 47: invalid enum equal
    expression, cannot compare enum value of type
    <code>[myCompnay.application.Status]</code> with a non enum value
    of type <code>[java.lang.String]</code>.     at
    org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:501)</p>
  </blockquote>
  
  <p>How do I fix this?</p>