我有一个Entity
withenum
属性和一对 on NamedQueries
。其中之一NamedQueries
具有enum
属性作为参数,即
SELECT m FROM Message m WHERE m.status = :status
当我尝试运行查询时,出现以下错误;
Caused by: java.lang.IllegalArgumentException: You have attempted to set a value of type class my.package.Status for parameter status with expected type of class my.package.Status from query string SELECT m FROM Message m WHERE m.status = :status.
我正在使用 Toplink
这怎么样?我怎样才能让 JPA 开心?