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

如何在orientdb中更新嵌入式地图?,orientdb,Orientdb,我在DB类中有一个嵌入的映射项,如下所示 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": "

我在DB类中有一个嵌入的映射项,如下所示

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
数据的属性,其中包含示例中的
dataStep2
dataStep3

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
是要更新的记录的删除,而
embedded
是包含
EMBEDDEDMAP
数据的属性,其中包含示例中的
dataStep2
dataStep3

此方法将删除其他记录(这将删除dataStep3)。我只想更新一个,而其他值保持不变。此方法将删除其他记录(这将删除数据步骤3)。我只想更新一个,而其他值保持不变。