cancel
Showing results for 
Search instead for 
Did you mean: 

Infix filters in CAP Node.js not working

smok1
Explorer
0 Kudos

Inflix filters in CAP Node.js seems not to be working:

For eg:

1. Clone https://github.com/SAP-samples/fiori-elements-v4-cap-advanced

2. CDS versions are the latest: 

smok1_0-1713933435191.png

2. In travel-service.js, insert the following code :

      const test1 = await SELECT.from(Travel, { TravelID: '4132' }).columns(travel => {
        travel`TravelUUID`,
          travel.to_Agency`[AgencyID='070036']`((agency) => {
            agency`AgencyID`
          })
      })
 
     for e.g, in 
      this.after('READ', 'Passenger', async (req) => {
       ...
      }
3. By right this shouldn't return any values as it has AgencyID='070036' - which is invalid , but it returns:
    {"TravelUUID":"75757221A8E4645C17002DF03754AB66","to_Agency":{"AgencyID":"070043"}}
 
FYI I've tried in CDS ^6 and it works. It's not working in 7.8.2 (latest as of this time).
 
Thanks.

 

Accepted Solutions (0)

Answers (0)