updateByQuery 遇到子对象的值为null 时会崩溃,期望能捕获跳过null的字段
Closed this issue · 1 comments
huachongwei commented
"script": {
"lang": "painless",
"source": @"""
ctx._source.tax_category_id=params.tax_category_id;
ctx._source.tax_category=params.tax_category;
""",
"params": {
"tax_category_id":#[taxCategoryId],
"tax_category":{
"id": #[taxCategory->id],
"name":#[taxCategory->name],
"code": #[taxCategory->code],
"remark":#[taxCategory->remark]
}
如上代码,假设#[taxCategory->code] 当code的值为null时,系统奔溃,期望能捕获这种异常,正常继续往下执行。
yin-bp commented
问题已经在5.0.8.1分支中解决,升级参考文档:
spring boot项目:https://my.oschina.net/bboss/blog/1835601
非spring boot项目:https://my.oschina.net/bboss/blog/1801273