Can anyone offer an approach to this.
I am working on a use case for maintaining people using business partner design. In this design a person can take on one of more roles. Below is a diagram of the normalised data model I have created thus far which seems to be working to a point.
I have been able to do the following without having to maintain a service.js file. I.e. the CDS engine supports all crud operations out of the box (which is pretty impressive work from the CDS team). Until now I can:
To make the ObjectPage more meaningful to a user, I would like to add a column for Role Name that will show the corresponding name (Role.roleName) for the selected Role ID.
Is there a way to do this while maintaining a normalised data model?
Thanks in advance:
I did attempt the approaches mentioned in https://blogs.sap.com/2019/08/21/computed-field-example-in-cap/.
I found that DJ Adams approach resulted in an "SQLITE_ERROR: no such column: roleName" when creating a new Person_Role - Possibly requiring some intervention to remove the computed roleName field and then create the insert manually
I then tried Pierre Dominique approach but this resulted in a compile error on AdminService saying "AdminService.Person_Role" of autoexposed entity for "com.or.assistant.Person_Role" collides with other definition - possibly because to Persons has a @odata.draft.enabled annotation