Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hibernate - delete hql in eclipse hibernate tool

Tags:

hibernate

I tried to execute a delete query as following in eclipse's HQL tool

delete from Address address where address.id = 6

but i got the

org.hibernate.hql.QueryExecutionRequestException: Not supported for DML operations

Please tell me that i've done wrong. Thank you.

like image 623
robinmag Avatar asked Dec 29 '09 18:12

robinmag


1 Answers

Try the annotation @Modifying on the update method.

like image 118
khoi nguyen Avatar answered Oct 08 '22 13:10

khoi nguyen