Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add Role.roleName to Object Page: qmacro approach
  • Loading branch information
Sergio Congia authored and Sergio Congia committed May 1, 2020
1 parent 17eee6b commit cfa0e09
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions srv/admin-service.cds
Expand Up @@ -5,16 +5,16 @@ service AdminService @(path:'/admin') {
annotate Persons with @odata.draft.enabled;

//------- auto-exposed --------
entity Person_Role as projection on db.Person_Role;
//entity Person_Role as projection on db.Person_Role;
//> these shall be removed but this would break the Fiori UI

// qmacro approach from https://blogs.sap.com/2019/08/21/computed-field-example-in-cap/
// Results in error "SQLITE_ERROR: no such column: roleName"
// Does not conflict with auto-exposure, but requires logic in Srv to insert as
// entity Person_Role as select from db.Person_Role{
// *,
// null as roleName : db.RoleName
// };
entity Person_Role as select from db.Person_Role{
*,
null as roleName : db.RoleName
};

// Pierre Dominique approach in "Answers section of" https://blogs.sap.com/2019/08/21/computed-field-example-in-cap/
// Note: Conflicts with auto-exposed from @odata.draft.enabled
Expand Down

0 comments on commit cfa0e09

Please sign in to comment.