2017-01-10 1 views
0

Использование версии Orient db 2.1.12 (DocumentDB). Устранение проблем при расширении столбца связанного списка. Результат моего orientdb запроса:Развернуть столбец связанного списка в 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 запроса, используемого для получения вышеуказанного результата выбрать * из Тестов Ожидаемый результат:

{ 
    "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)" 
} 

Необходимо развернуть избавление, присутствующее в списке. Устали выберите testSuiteName, testingType, Expand (testCaseLink) из Тестов где testSuiteName = 'паутина'

Но запрос расширяется только testCaseLink.Note: testCaseLink содержит избавиться от различного класса

ответ

1

Вы можете использовать

select from testSuite FETCHPLAN *:1 

Для получения дополнительной информации отметьте documentation.

Надеюсь, это поможет.

0

выбрать из testSuite FETCHPLAN *: 1

Смежные вопросы