cancel
Showing results for 
Search instead for 
Did you mean: 

Possible to define EntitySet's name within CDS?

detrapto
Explorer

Hi folks,

I'm trying to mirror a simple existing on-premise OData-Service via CAP. The original service contains an EntitySet named "EquitSet" containing of elements of type "Equit". The metadata shows something like:

<EntitySet Name="EquitSet" EntityType="ZSRV.Equit"/>

The service is defined in cds as:

using blabla as ZSRV from './zsrv';

service mirror_service {
    @readonly entity Equit as projection on ZSRV.Equit;
}

which translates to metadata

<EntitySet Name="Equit" EntityType="mirror_service.Equit"/>

I'd like to define the name of the resulting entitySet (was "EquitSet", now is "Equit"). Is there any option within CDS to solve this? I didn't find anything corresponding in the docs.

Thanks for your help,

Tobi

View Entire Topic
hjb
Advisor
Advisor
0 Kudos

Hello Tobias,

CDS entity names are used as names for the <edmx:EntitySet>. This is intentional the reason why we recommend using plural forms (eg. PurchaseOrderItems instead of PurchaseOrderItem) to be verbose in the metadata.

To answer your question: No there is no means or option to provide an alternative EntitySet name.

Regards, Hans-Joachim