Skip to Content
0
Jan 19, 2023 at 09:55 AM

Custom name for managed Composition/Association

203 Views

Hi,

this may sound stupid but I find it really annoying how the names are generated for properties related to managed associations/compositions. E.g. if I have something like this:

group : Association to PromotionGroups;

it generates property group_id. This is documented in CAP documentation. My problem is that all properties use camel case names but just these properties use _. Even the properties added automatically by draft handling have nice names like IsActiveEntity.

I don't see any way how to change this in CAP documentation. Is there a way? If I switch to unmanaged association/composition where I can define my own property, what do I lose? I know that I will lose foreign keys. Is there anything else? Are managed association really that beneficial? I have to provide nicer error messages for these fields anyway so I will have a logic for validation in the service layer anyway.

Or is there any other way how to provide nicer names for these properties?

Thanks