0

在 2.2 发布之前的大约 6 个月里,我一直在开发一些基本查询

CREATE CLASS Flag_Definitions EXTENDS V
CREATE PROPERTY Flag_Definitions.V_status EMBEDDEDMAP STRING
CREATE PROPERTY Flag_Definitions.V_branding EMBEDDEDMAP STRING
CREATE PROPERTY Flag_Definitions.Block_type EMBEDDEDMAP STRING

CREATE VERTEX Flag_Definitions SET title = "developer reference for all data flags", V_status = {"ACTIVE":"Normal active record", "SUSPENDED":"Currently inactive record","DELETED":"Discontinued record maintained for archiving"}, Block_type = {"Prop":"Holds text from a data object property","HTML":"Holds basic HTML for content","Container":"Holds other blocks"}

但现在我在工作室遇到了这个错误

{"errors":[{"code":400,"reason":400,"content":"Map found but entries are not defined as :\r\n\tDB name=\"TestDB\""}]}

从控制台看,措辞略有不同

Map found but entries are not defined as <key>:<value>

无论哪种方式,格式 'SET mapfield = {"key":"val"}' 似乎不再有效,我找不到解释。我什至查看了github 上的 orient 代码(第 118 行),但是,有 2 个部分,格式应该通过第 117 行的检查。

4

1 回答 1

0

解决了这个问题,它与 Flag_Definitions 对象无关,但我有一个默认状态标志应用于所有创建的顶点

CREATE PROPERTY V.flags EMBEDDEDMAP STRING
ALTER PROPERTY V.flags DEFAULT {"status":"ACTIVE"} 

问题是默认值,需要

DEFAULT '{"status":"ACTIVE"}'

同样,我不得不 DEFAULT sysdate()改为DEFAULT "sysdate()"

于 2016-07-13T19:35:33.583 回答