mehandih / grails-jaxrs

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

GORM version property is not included in the serialized XML or JSON #70

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
I created the examples on the Getting Started wiki page using a new install of 
a Grails 2.1.1 application.  Everything works as expected.  I can create and 
retrieve Person objects in XML and JSON.

The issue I see, is that the GORM version property is not included in the 
serialized XML or JSON.  If a client is using optimistic locking, the version 
property is required.  Is there a way to enable the version property to be 
included on GET and PUT requests?

What is the expected output? 
{
    "class": "hello.Person",
    "id": 1,
    "version": 0
    "firstName": "Sam",
    "lastName": "Hill"
}

What do you see instead?
{
    "class": "hello.Person",
    "id": 1,
    "firstName": "Sam",
    "lastName": "Hill"
}

What version of the product are you using? 
jaxrs:0.6

On what operating system?
Max OS X

Original issue reported on code.google.com by t.skowro...@gmail.com on 27 Nov 2012 at 2:56