You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to perform an update action in a single field using gorm data services through grails.gorm.services.Query. In the documentation I found an example very similar to my case of use
@Query("update ${Book book} set ${book.title} = $newTitle where book.title = $oldTitle")
Number updateTitle(String newTitle, String oldTitle)
The code that I try is the following:
@Query("update ${Activity activity} set ${activity.state} = $state where activity.id = $id")
Activity updateState(final String state, final Serializable id)
I am getting a query exception org.grails.orm.hibernate.exceptions.GrailsQueryException with the following caused by message
Invalid query [UPDATE anotherdemo.Activity as activity SET activity.state = :p0 WHERE activity.id = :p1] for domain class [anotherdemo.Activity]
Please visit this link to a github repository with an example app that reproduces the issue
Environment Information
Operating System: Ubuntu 16.04
Grails Version: 3.3.0.M2
JDK Version: Using java version 8u121
Thanks for your time
The text was updated successfully, but these errors were encountered:
I'm trying to perform an update action in a single field using gorm data services through
grails.gorm.services.Query
. In the documentation I found an example very similar to my case of useThe code that I try is the following:
I am getting a query exception
org.grails.orm.hibernate.exceptions.GrailsQueryException
with the following caused by messageInvalid query [UPDATE anotherdemo.Activity as activity SET activity.state = :p0 WHERE activity.id = :p1] for domain class [anotherdemo.Activity]
Please visit this link to a github repository with an example app that reproduces the issue
Environment Information
Thanks for your time
The text was updated successfully, but these errors were encountered: