Skip to Content
0
Sep 04, 2019 at 12:28 PM

service projection exposed entities alias, how is it supposed to work?

99 Views

Based on https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/4eb171573f5947518a9b080029980429.html, where it says under Exposed Entities:

service CatalogService{
  entity Productas projection on data.Products{
    *, created.at as since 
  } excluding { created };
}

So, I'm trying (as a proof of concept) to alias the required input fields. I've added this to my service.cds.

entity MyEntity as projection on api.MyEntities {
  *,
  someField as somethingElse
} excluding { someField };

The generated $metadata also reflects this.

However, when doing a GET or POST on /v1/service/MyEntity, I get a 500 error and the console is telling me:

[2019-09-04T12:21:38.204Z | ERROR | 1832755]: invalid column name: SOMETHINGELSE: line 1 col 282 (at pos 281)

Does this feature not work or am I using it incorrect?