File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes hql delete join Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "hql delete join" Watch "hql delete join" New topic

hql delete join

siraj baig
Ranch Hand

Joined: Jul 11, 2006
Posts: 42
I am able to delete records from a single table.
But when i try to delete from multiple tables using joins Hiberate throws

Exception in thread "main" org.hibernate.hql.ast.QuerySyntaxException: unexpecte d token: , near line 1, column 31

My Query: " delete from org.hib.Table1 t1,org.hib.Table2 t2 where = and "

Can you please tell me how to delete records from multiple tables using joins

I agree. Here's the link:
subject: hql delete join
It's not a secret anymore!