SAP Cloud Platform:无法在v4目录服务上扩展

2020-09-03 11:15发布

点击此处---> 群内免费提供SAP练习系统(在群公告中)加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中) 1)我已经使用业务应用程序模板...

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


1)我已经使用业务应用程序模板data-model.cds文件定义了父+子实体集:

(遵循 CDS协会上的SAP文档

实体用户{
 密钥电子邮件:Common.DataKey;
 名字:Common.DataKey;
 姓氏:Common.DataKey;
 密码:Common.DataKey;
 ToAuthorizations:与许多Data.Authorization关联到ToAuthorizations.User = $ self;
 }


 实体授权{
 关键用户:与Data.User的关联;
 密钥ID:Common.DataKey10;
 

2)并通过目录服务公开实体:

 service CatalogService {

 实体用户@(
 能力:{
 InsertRestrictions:{Insertable:true},
 UpdateRestrictions:{可更新:true},
 DeleteRestrictions:{可删除:true}
 }
 )作为Data.User的投影;

 实体授权@(
 能力:{
 InsertRestrictions:{Insertable:true},
 UpdateRestrictions:{可更新:true},
 DeleteRestrictions:{可删除:true}
 }
 )作为对Data.Authorization的投影;
 

/ToAuthorizations可以正常工作

请求网址:
 https:// -approuter.cfapps.eu10.hana.ondemand.com/odata/v4/CatalogService/Users('email')/ToAuthorizations
 请求方法:
 得到
 状态码:
 200 OK
 远端地址:
 35.157.43.191:443
 推荐人政策:
 降级时无推荐人
 

?$ expand = ToAuthoriations失败"错误:列的定义不明确:"

请求网址:
 https:// -approuter.cfapps.eu10.hana.ondemand.com/odata/v4/CatalogService/Users('email')?$ expand = ToAuthorizations
 请求方法:
 得到
 状态码:
 500内部服务器错误
 远端地址:
 18.185.232.121:443
 推荐人政策:
 降级时无推荐人
 
 rootCause:
    {[错误:定义的含糊柱:TE9B38C6D385050B954D0FCA6B994B1F9_USER_EMAIL:行1个栏120(在pos 119):`SELECT te9b38c6d385050b954d0fca6b994b1f9.te9b38c6d385050b954d0fca6b994b1f9_ID AS te9b38c6d385050b954d0fca6b994b1f9_ID,te9b38c6d385050b954d0fca6b994b1f9.te9b38c6d385050b954d0fca6b994b1f9_User_Email AS te9b38c6d385050b954d0fca6b994b1f9_User_Email,te9b38c6d385050b954d0fca6b994b1f9.te9b38c6d385050b954d0fca6b994b1f9_User_Email AS te9b38c6d385050b954d0fca6b994b1f9_User_Email FROM(SELECT te9b38c6d385050b954d0fca6b994b1f9.ID AS te9b38c6d385050b954d0fca6b994b1f9_ID,te9b38c6d385050b954d0fca6b994b1f9。  USER_EMAIL AS te9b38c6d385050b954d0fca6b994b1f9_User_Email,te9b38c6d385050b954d0fca6b994b1f9.User_Email AS te9b38c6d385050b954d0fca6b994b1f9_User_Email,ROW_NUMBER()OVER(PARTITION BY te9b38c6d385050b954d0fca6b994b1f9.User_Email)AS ROWNUMBER FROM Data_Authorization te9b38c6d385050b954d0fca6b994b1f9 INNER JOIN(SELECT tee4a5c246a800bcdc8128aa48309fa01.Email AS的电子邮件Data_User  tee4a5c246a800bcdc8128aa48309fa01 WHERE tee4a5c246a800bcdc8128aa48309fa01.Email =?)filterExpand ON te9b38c6d385050b954d0fca6b994b1f9.User_Email = filterExpand.Email)te9b38c6d385f0f9f9f9f9f9f954f9f954f994f9f954f9f954f9f954f9f9f954f9f954f9f954f9f954f9f954f9f954f9f954f9f954f9e  AND te9b38c6d385050b954d0fca6b994b1f9.rowNumber <?`]
      消息:"定义的含糊柱:TE9B38C6D385050B954D0FCA6B994B1F9_USER_EMAIL:行1个栏120(在pos 119):`SELECT te9b38c6d385050b954d0fca6b994b1f9.te9b38c6d385050b954d0fca6b994b1f9_ID AS te9b38c6d385050b954d0fca6b994b1f9_ID,te9b38c6d385050b954d0fca6b994b1f9.te9b38c6d385050b954d0fca6b994b1f9_User_Email AS te9b38c6d385050b954d0fca6b994b1f9_User_Email,te9b38c6d385050b954d0fca6b994b1f9.te9b38c6d385050b954d0fca6b994b1f9_User_Email AS te9b38c6d385050b954d0fca6b994b1f9_User_Email FROM(SELECT te9b38c6d385050b954d0fca6b994b1f9.ID AS te9b38c6d385050b954d0fca6b994b1f9_ID,te9b38c6d385050b954d0fca6b994b1f9.User_Email  AS te9b38c6d385050b954d0fca6b994b1f9_User_Email,te9b38c6d385050b954d0fca6b994b1f9.User_Email AS te9b38c6d385050b954d0fca6b994b1f9_User_Email,ROW_NUMBER()OVER(PARTITION BY te9b38c6d385050b954d0fca6b994b1f9.User_Email)AS ROWNUMBER FROM Data_Authorization te9b38c6d385050b954d0fca6b994b1f9 INNER JOIN(SELECT tee4a5c246a800bcdc8128aa48309fa01.Email AS的电子邮件Data_User  tee4a5c246a800bcdc8128aa48309fa01 WHERE tee4a5c246a800bcdc8128aa48309fa01.Email =?)filterExpand ON te9b38c6d385050b954d0fca6b994b1f9.User_Email = filterExpand.Email)te9b38c6d385f0f9f9f9f9f9f954f9f954f994f9f954f9f954f9f954f9f9f954f9f954f9f954f9f954f9f954f9f954f9f954f9f954f9e  AND te9b38c6d385050b954d0fca6b994b1f9.rowNumber <?`',
      码:" 268",
      sqlState:" HY000",
      1级,
      位置:0}}
 75xBkbD2wWSvaoQGion-execution-srv.cfapps.eu10.hana.ondemand.com-[2019-08-15T15:32:16.084 + 0000]" GET/odata/v4/CatalogService/Users('austin.kloske@contax.com')  ?$ expand = ToAuthorizations HTTP/1.1" 500 0 154"-"" Mozilla/5.0(X11; CrOS x86_64 12239.67.0)AppleWebKit/537.36(KHTML,如Gecko)Chrome/76.0.3809.102 Safari/537.36""-""  10.0.138.254:61013" x_forwarded_for:"-" x_forwarded_proto:" https" vcap_request_id:" 47ccda5c-0e52-4e49-6195-998a9e7fa5dc" response_time:0.093576791 app_id:" 480109c9-3023-4363-be92-2a0_bad_index"  x_correlationid:" 3ce7b0ab-c98a-4ced-4428-2cb743e1b1b3" tenantid:"-" x_b3_traceid:" c8eaa1f7f0a389dc" x_b3_spanid:" c8eaa1f7f0a389dcdc" x_b3_parentspanid7-f1a7f0aaf1a7f0aaf1a7f0aaf1a7f0aaf0aaf7af0aaf1af7af0a-f1af7af0b-faaf7af0b-e            
4条回答
SC_Yao
2020-09-03 12:16

这似乎是一个别名问题(基于呈现的SQL)。

您是否曾尝试对Authorization实体中的User属性使用其他别名?

类似的东西:

实体授权{
 关键AuthorizedUser:与Data.User的关联;
 密钥ID:Common.DataKey10; 

一周热门 更多>