MarkAtHarvest
2009-01-13 15:05:24 UTC
I am trying to delete all records in a table, but execute query throws me an
exception
89: Emp.executeQuery('delete from Emp')
It this works, I want to have a query something like
Emp.executeQuery('delete e from Emp where e.name like $empName" ')
Thanks in Advance
+++++++++++
Following is the exception I am getting
Error 200: org.springframework.orm.hibernate3.HibernateQueryException: Not
supported for DML operations [delete from Emp]; nested exception is
org.hibernate.hql.QueryExecutionRequestException: Not supported for DML
operations [delete from Emp]
Servlet: grails
URI: /sample/grails/emp/refresh.dispatch
Exception Message: Not supported for DML operations [delete from Emp];
nested exception is org.hibernate.hql.QueryExecutionRequestException: Not
supported for DML operations [delete from Emp]
Caused by: org.springframework.orm.hibernate3.HibernateQueryException: Not
supported for DML operations [delete from Emp]; nested exception is
org.hibernate.hql.QueryExecutionRequestException: Not supported for DML
operations [delete from Emp]
Class: EmpService
exception
89: Emp.executeQuery('delete from Emp')
It this works, I want to have a query something like
Emp.executeQuery('delete e from Emp where e.name like $empName" ')
Thanks in Advance
+++++++++++
Following is the exception I am getting
Error 200: org.springframework.orm.hibernate3.HibernateQueryException: Not
supported for DML operations [delete from Emp]; nested exception is
org.hibernate.hql.QueryExecutionRequestException: Not supported for DML
operations [delete from Emp]
Servlet: grails
URI: /sample/grails/emp/refresh.dispatch
Exception Message: Not supported for DML operations [delete from Emp];
nested exception is org.hibernate.hql.QueryExecutionRequestException: Not
supported for DML operations [delete from Emp]
Caused by: org.springframework.orm.hibernate3.HibernateQueryException: Not
supported for DML operations [delete from Emp]; nested exception is
org.hibernate.hql.QueryExecutionRequestException: Not supported for DML
operations [delete from Emp]
Class: EmpService
--
View this message in context: http://www.nabble.com/Gorm-ExecuteQuery-for-Delete-not-working-tp21437502p21437502.html
Sent from the grails - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
View this message in context: http://www.nabble.com/Gorm-ExecuteQuery-for-Delete-not-working-tp21437502p21437502.html
Sent from the grails - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email