BluSynergy
2010-02-12 18:05:34 UTC
I'm trying to do a bulk update so that I avoid the performance hit of
retrieving each object and performing the individual update. The syntax
seems to be in line with what hibernate is calling for per this link:
http://docs.jboss.org/hibernate/core/3.3/reference/en/html/batch.html#batch-direct
Yet I get this exception:
org.springframework.orm.hibernate3.HibernateQueryException: Not supported
for DML operations; nested exception is
org.hibernate.hql.QueryExecutionRequestException: Not supported for DML
operations [update com.blusynergy.blubilling.customer.BasePaymentMethod set
autopayPreference = autopayPreference - 1 where org=? and customer=? and
autopayPreference > ?]
The actual code is:
BasePaymentMethod.executeQuery('update BasePaymentMethod set
autopayPreference = autopayPreference - 1 where org=? and customer=? and
autopayPreference > ?', [org, customer, prefNo])
Is this not supported in Grails 1.1.1.?
retrieving each object and performing the individual update. The syntax
seems to be in line with what hibernate is calling for per this link:
http://docs.jboss.org/hibernate/core/3.3/reference/en/html/batch.html#batch-direct
Yet I get this exception:
org.springframework.orm.hibernate3.HibernateQueryException: Not supported
for DML operations; nested exception is
org.hibernate.hql.QueryExecutionRequestException: Not supported for DML
operations [update com.blusynergy.blubilling.customer.BasePaymentMethod set
autopayPreference = autopayPreference - 1 where org=? and customer=? and
autopayPreference > ?]
The actual code is:
BasePaymentMethod.executeQuery('update BasePaymentMethod set
autopayPreference = autopayPreference - 1 where org=? and customer=? and
autopayPreference > ?', [org, customer, prefNo])
Is this not supported in Grails 1.1.1.?
--
View this message in context: http://n4.nabble.com/GORM-Bulk-updates-Not-supported-for-DML-operations-tp1480764p1480764.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://n4.nabble.com/GORM-Bulk-updates-Not-supported-for-DML-operations-tp1480764p1480764.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