I want to delete a list of items and I defined the following query for the Entity Email:
@NamedQuery(name = Email.namedQueryDeleteOldEmails, query = "DELETE FROM Email e where e.creationDate <= :creationDate")
When I execute it, I have the following error: 2012-10-26 12:45:25,570 ERROR [SGVISTA] org.hibernate.hql.internal.ast.ErrorCounter - line 1:1: unexpected token: Email line 1:1: unexpected token: Email
Does anybody know what is wrong with my query? Thank you very much