cuba-platform / restapi

CUBA REST API Add-on
Apache License 2.0
8 stars 7 forks source link

Incorrect message for attribute inherited from mapped superclass #132

Open stan-golembivsky opened 3 years ago

stan-golembivsky commented 3 years ago
"dependencies": {
    "@cuba-platform/react-core": "^1.0.0-alpha.0",
    "@cuba-platform/react-ui": "^1.0.0-alpha.0",
    "@cuba-platform/rest": "^1.0.0-alpha.0",

If you are trying to display entity property that was inherited from @MappedSuperclass than label will be displayed from that @MappedSuperclass

For example if we have ContactPhone entity that extends ContactItem entity and ContactItem entity has field 'contact' than using EntityProperty component we will got ContactItem.contact in label

<EntityProperty entityName='project_ContactPhone' propertyName={ 'contcat' } ...

Result:

Value: 123123123

in messages_ru.properties file we have

ContactItem.contact=Value
ContactPhone.contact=Phone

I expect :

Phone: 123123123

vyacheslav-pushkin commented 3 years ago

Hi @stan-golembivsky,

I presume that's the way the description is returned from the REST API (metadata/entities)? If so, then this ticket belongs here.

HegelPro commented 3 years ago

@vyacheslav-pushkin , yes. These labels arrive from REST API /metadata/entities route.