展开OrientDb中的链表列

Expand the linked list column in OrientDb

使用 Orient db 2.1.12(DocumentDB) version.Facing 在扩展链表列时出现问题。 我的 orientdb 查询结果:

{
    "result": [
        {
            "@type": "d",
            "@rid": "#28:0",
            "@version": 7,
            "@class": "testSuite",
            "testSuiteName": "web",
            "testCaseLink": [
                "#20:0",
                "#20:1",
                "#20:2",
                "#20:3",
                "#20:4",
                "#20:5"
            ],
            "testingType": "Web",
            "@fieldTypes": "testCaseLink=z"
        }
    ],
    "notification": "Query executed in 0.061 sec. Returned 1 record(s)"
}

testCaseLink 是一个 属性 链表,其值与用于获取上述结果的另一个 class.The 查询相同 select * from testSuite 预期输出:

{
    "result": [
        {
            "@type": "d",
            "@rid": "#28:0",
            "@version": 7,
            "@class": "testSuite",
            "testSuiteName": "web",
            "testCaseLink": [
                {
                    "@type": "d",
                    "@rid": "#20:0",
                    "@version": 5,
                    "@class": "testCase",
                    "name": "testForBAsu",
                    "uiJson": "#18:0",
                    "testcaseType": "webWithCsv",
                    "isEdited": false,
                    "isDeleted": false,
                    "childtestCaseLink": [
                        "#20:3",
                        "#20:4"
                    ],
                    "@fieldTypes": "uiJson=x,childtestCaseLink=z"
                },
                {
                    "@type": "d",
                    "@rid": "#20:1",
                    "@version": 6,
                    "@class": "testCase",
                    "name": "success",
                    "uiJson": "#18:1",
                    "testcaseType": "WebWithoutCsv",
                    "isEdited": true,
                    "isDeleted": false,
                    "eeJson": "#19:0",
                    "parentTestCaseLink": null,
                    "@fieldTypes": "uiJson=x,eeJson=x,parentTestCaseLink=x"
                },
                "#20:2",
                "#20:3",
                "#20:4",
                "#20:5"
            ],
            "testingType": "Web",
            "@fieldTypes": "testCaseLink=z"
        }
    ],
    "notification": "Query executed in 0.061 sec. Returned 1 record(s)"
}

需要展开列表中的 rid。 累 select testSuiteName,testingType,Expand(testCaseLink) from testSuite where testSuiteName='web'

但是查询只扩展了 testCaseLink.Note:testCaseLink contains rid of different class

你可以使用

select from testSuite FETCHPLAN *:1

查看 documentation 了解更多信息。

希望对您有所帮助。

select 来自 testSuite FETCHPLAN *:1