cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Possible to define EntitySet's name within CDS?

detrapto
Explorer
1,306

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

Accepted Solutions (1)

Accepted Solutions (1)

hjb
Product and Topic Expert
Product and Topic Expert
0 Likes

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

Answers (1)

Answers (1)

Former Member
0 Likes

Hello,

I've been searching for a solution lately on this very topic, without any success. Searched the documentation and forums, but no luck yet. Anyone knows if this is still not supported?

Thank you!

Rafael