如何更新 orientdb 中的嵌入式地图?

How to Update Embedded map in orientdb?

我的数据库中有一个嵌入式地图条目 class 如下。

Json 字符串:

{
"dataStep2": "{stepno: 2,content:'', icon:'plug icon', color:'olive', header:'Uptime Guarantee',headcolor:'ffffff', tagline:'Check out our plug-in marketplace',taglinecolor:'ffffff', isActive:true}",
    "dataStep3": "{stepno: 3,content:'', icon:'plug icon', color:'blue', header:'Uptime Guarantee',headcolor:'ffffff', tagline:'Check out our plug-in marketplace',taglinecolor:'ffffff', isActive:true}"
}

我只想更新嵌入地图的一部分。例如 "datastep2" 值。 请建议我这样做。

提前致谢。

您可以使用此查询:

update #24:0 set embed.dataStep2="{stepno: 2,content:'', icon:'plug icon', color:'green', header:'Uptime Guarantee',headcolor:'ffffff', tagline:'Check out our plug-in marketplace',taglinecolor:'ffffff', isActive:true}"

其中 #24:0 是删除要更新的记录,embed 是 属性 包含 EMBEDDEDMAP 数据 dataStep2dataStep3 来自你的例子。