开发者

Grails domain version value as part of JSON

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜