3

In a edit page, I am passing the domain object as JSON object to be manipulated at client side using jQuery.

render domainClassObject as JSON

When I see the response in client side (in firebug for e.g.), there is no "version" property. Only "version" is missing, all other values are available. What is the reason for this and what should I do to get the "version" value also as part of response from server when using "as JSON"

Thank You. Jay Chandran.

Jay Chandran
  • 382
  • 1
  • 8
  • 20

1 Answers1

5

Per the Grails Converters reference:

grails.converters.json.domain.include.version (Boolean) - Set to true if JSON Converter should default include version from domain (default: false)

Set this to true in your Config.groovy.

Kaleb Brasee
  • 51,193
  • 8
  • 108
  • 113