I am getting an error
org.hibernate.HibernateException: Errors in named queries: GroupKPI.deleteKPIList
in this query :
@NamedQuery(name="GroupKPI.deleteKPIList" , query="delete from GroupKPI kpi where kpi.kpiKey in :list2BDeleted")
class :
@Entity
@Table(name="GROUP_KPI")
public class GroupKPI implements Serializable{
public GroupKPI() { }
@EmbeddedId
private GroupKpiKey kpiKey;
.
.
.
.
.
}
I need to pass a list of GroupKPI
to the query
I am using hibernate 3.3.0
EDIT :
The whole log :
org.hibernate.QueryException: query must begin with SELECT or FROM: delete
I found here that the error is fixed by applying the parser org.hibernate.hql.ast.ASTQueryTranslatorFactory
but the project is old and might have some old queries so the parser cant be changed safely ... so any other suggestions or alternative syntax?