mehandih / grails-jaxrs

Automatically exported from code.google.com/p/grails-jaxrs
0 stars 0 forks source link

Default PUT method in Resource.groovy does not update properly #41

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi Martin,

for me, the default PUT method in the Resource.groovy class does not update the 
domain object properly. 
The AdvancedFeatures guide describes the update process by
obj.properties = dto.properties
ok obj

Does this really provide an update or may I have to call obj.save() in 
addition, in order to persist the update to the database?
After FunctionalTesting the PUT method presents me the correct updated output, 
but if I send an additional GET, Grails returns the old domain object instead.
By using a special Reader and explicitly calling the validate() and save() 
method, my domain object is updated correctly. PUT and GET output present the 
same result.

Please correct me if I'm doing something wrong.

Thanks,
Sebastian

Original issue reported on code.google.com by eckl...@googlemail.com on 25 Jul 2011 at 2:28

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi Sebastian,

can you please share an example application so that I can reproduce your 
problem (I wasn't able to reproduce it myself). Also, I'm currently working on 
adjusted transaction boundaries for CRUD actions, maybe this will solve the 
issues you're facing. With an example application I could verify that for you.

Thanks,
Martin

Original comment by krass...@googlemail.com on 28 Aug 2011 at 6:30

GoogleCodeExporter commented 8 years ago
With the latest commit (http://jira.grails.org/browse/GRAILS-6459) all DB 
operations are now done within a generated service class. Can you please try 
again with the latest version of the plugin and let me know if that solves your 
problems?

Original comment by krass...@googlemail.com on 30 Aug 2011 at 9:21