cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP CAP(Java) cds infix filter

ShoTim
Associate
Associate
0 Kudos
186

Hi!

Looking for support about infix filters in cds in a SAP CAP Java project. I have the following entity structure (simplified view):

entiy ![Case] : cuid, managed {
roles : Association to many RoleUserMap
on roles.caseID = $self;
}
entity RoleUserMap : cuid, managed {
caseID : Association to one ![Case];
roleName : RoleType;
userIDExternal : String(100);
user : Association to one User;
}

@CDS.persistence.skip
entity User {
key ID : String(100);
userName: String(200);
email: String(200);
givenName : String(20);
familyName : String(20);

}

In order to make view in a service more detailed was applied the following view (contains more then that fields)
entity Cases as
select from casemanager.Case {
roles[roleName = 'REQUESTER'].user as requesters,
roles[roleName = 'MAINTENANCE_TECHNICIAN'].user as maintenanceTechnicians,
}

My assumption was that it will return an array of users but returns one entity. But when I try to edit it like 'roles[roleName = 'REQUESTER'] as requesterRoles,' it works correctly and returns a list.

May be you can provide some workaround on that or is it a bug to report?
Thank you in advance!




Accepted Solutions (0)

Answers (0)