cancel
Showing results for 
Search instead for 
Did you mean: 

Illegal circular reference to “CatalogService.V_INTERACTION”

kjyothiraditya
Participant
0 Kudos

Hi,

while following tutorial https://developers.sap.com/tutorials/hana-cloud-cap-calc-view.html, i am stuck at step 3, where i am getting error.

[ERROR] srv/interaction_srv.cds:14:41-54: Illegal circular reference to “CatalogService.V_INTERACTION” (in entity:“CatalogService.V_INTERACTION”)<br>

interaction.cds is as below:

// namespace app.interactions;

using { Country } from '@sap/cds/common';

context app.interactions {

type BusinessKey : String(10);type SDate : DateTime;type LText : String(1024);


entity Interactions_Header { key ID : Integer; ITEMS : Composition of many Interactions_Items on ITEMS.INTHeader = $self; PARTNER : BusinessKey; LOG_DATE : SDate; BPCOUNTRY : Country;

};entity Interactions_Items {
key INTHeader : association to Interactions_Header; key TEXT_ID : BusinessKey; LANGU : String(2); LOGTEXT : LText;};
}
@cds.persistence.exists @cds.persistence.calcview Entity ![V_INTERACTION] {key ![ID]: Integer @title: 'ID: ID' ; ![PARTNER]: String(10) @title: 'PARTNER: PARTNER' ; ![LOG_DATE]: String @title: 'LOG_DATE: LOG_DATE' ; ![BPCOUNTRY_CODE]: String(3) @title: 'BPCOUNTRY_CODE: BPCOUNTRY_CODE' ; ![TEXT_ID]: String(10) @title: 'TEXT_ID: TEXT_ID' ; ![LANGU]: String(2) @title: 'LANGU: LANGU' ; ![LOGTEXT]: String(1024) @title: 'LOGTEXT: LOGTEXT' ; }

while interaction_srv.cds as below:

using app.interactions from '../db/interactions';using V_INTERACTION from '../db/interactions';
service CatalogService {
entity Interactions_Header as projection on interactions.Interactions_Header;
entity Interactions_Items as projection on interactions.Interactions_Items;

@readonly entity V_INTERACTION as projection on V_INTERACTION;
}

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi,

I had the same issue and could solve it by changing the entity name in the service definition from V_INTERACTION to V_Interaction (upper and lower case!), i.e.:

@readonly entity V_Interaction as projection on V_INTERACTION;