I have 2 tables in my entity
- VoucherProgram
- Voucher Denomination On these two tables I need to do a inner join and get result. I used the following to do. But getting the following error
using {db.VoucherProgram as vp, db.VoucherDenomination as vd} from '../db/datamodel';
///entity VoucherProgram as projection on vp
@protocol: 'rest'
service VoucherProgramDenom@(path:'/getVoucherProgramDenom') {
entity VoucherProgramDenoms as select from vp {
PROGRAM_ID,
EXPIRY_DATE,
VOUCHER_DENOM: Association to vd on VOUCHER_DENOM.PROGRAM_ID = PROGRAM_ID
};
}
Getting error like [ERROR] srv\voucherprogramdenom.cds:9:9: Unexpected usage of structured type “VOUCHER_DENOM.PROGRAM_ID” (in entity:“VoucherProgramDenom.VoucherProgramDenoms”/element:“VOUCHER_DENOM”/on)