开发者

Grails domain version value as part of JSON

开发者 https://www.devze.com 2023-03-22 16:08 出处:网络
In a edit page, I am passing the domain object as JSON object to be manipulated at client side using jQuery.

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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号