xsodata:converter [index]不是函数

时间:2018-01-31 08:27:04

标签: odata sap hana cds xsodata

我在hdbcds中有两个实体:

context PyramidDB {
    entity PipelineType {
        key TypeName    : String(200) not null;
            Displayname : String(200) not null;
            Description : String(300);
    };

    entity PyramidType {
        key TypeName    : String(200) not null;
            Displayname : String(200) not null;
            Description : String(500);
            Channel     : Boolean     not null default false;
    };
}

从这两个我将有一个OData服务。 xsodata:

service namespace "PyramidDBService.services" {
    "PyramidDBService.db::PyramidsDB.PipelineType" as "PipelineType";
    "PyramidDBService.db::PyramidsDB.PyramidType" as "PyramidType";
}

使用PipelineType没问题,但在PyramidType上我收到错误:

{
  "error": {
    "code": 500,
    "message": {
      "lang": "en-US",
      "value": "converter[index] is not a function"
    }
  }
}

有人可以帮助我吗?

1 个答案:

答案 0 :(得分:1)

SAP支持文档SAP Note "2130460 - Functional restrictions of XSOData to OData V2 Specifications for Rev. 90+"列出了XSODATA中实现的OData v2功能的限制:

  • 不支持功能导入
  • 不支持布尔类型
  • 不支持GUID类型
  • $ filter和$ orderby
  • 中不支持类型转换
  • 不支持$ skiptoken
  • 不支持复杂类型
  • 不支持从其他服务导入实体类型

借助HANA 2和OData v4支持,大部分限制,特别是布尔类型支持,将被删除。