Skip to Content
0
May 19, 2020 at 08:19 AM

Ugly generated property names

104 Views

Hi everyone,

reading the CAP documentation for associations, the following approach for associations is suggested.

channel: Association to one base.Channels;

What I really don't like about this is that it generates a key field by adding _ID to association name. In this case, there is navigation property "channel" and new property "channel_ID". This makes this generated property name really ugly. It really bothers me as well it goes against API guidelines like these from Microsoft. Is there an easy way how to change referential property name?

I know I can work around this using the following definition but this is advised against in CAP documentation.

channelID: base.ChannelId not null;

channel: Association to one base.Channels on channel.ID = channelID;

I have similar issue with entities genererated for localized properties. There, the suffix _text is used.

Thanks