Problems with making a query when using Enum in entity
Solution 1:
I think you should use your (fully qualified) Status
enum instead of literal value, so something like this: (assuming your Status
enum is in com.myexample
package)
@NamedQuery(name = "Question.allApproved",
query = "SELECT q
FROM Question q
WHERE q.status = com.myexample.Status.APPROVED").