JPAQL / HQL delete query translated to invalid SQL in Hibernate
Issue
- A
OneToOneassociation is defined between two entities -
A JPAQL / HQL delete query is executed
DELETE FROM Employee e WHERE e.task.name=:tname -
The query fails with an SQL syntax error
... Syntax error in SQL statement "DELETE FROM EMPLOYEE CROSS[*] JOIN TASK TASK1_ WHERE NAME=? "; SQL statement: delete from Employee cross join Task task1_ where name=? [42000-196]
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) (all versions)
- Red Hat Fuse (all versions)
- Hibernate (all versions)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
