a month ago - last edited a month ago
Dear experts,
We are facing a problem since a couple of weeks in a service that has been running for almost two years now:
We have two services connected via CDS import where I'm exposing one entity to be used locally from the other service:
@readonly
entity Divisions as projection on MD.Divisions;
Then I'm doing a basic selection:
const division = await this.run(SELECT.one.from(this.entities.Divisions)
.where({ division: t.division_division }));
When the framework expand the selection to build the query changes the * by a list of fields that come from the following structure in the cds.entities.Divisions.elements:
The two highlighted properties are the foreign keys of the automatic association localized. They do not belong to the Divisions entity and I have no idea why they are there.
We have a four systems landscape and we are facing this error in two of the system, I aligned package versions and the problem cannot be reproduced:
I checked for errors in the EDMX file we used on the cds import or in the csn.json file that points to these properties without success.
Can anyone support here?
Thanks,
Juanjo
Dear Patrice,
Thank you for your comments, you gave me a hint about what could be the problem.
It turns out that when we started the development of this project, two years ago, maybe at an early stage of the CAP framework, and maybe due to our lack of knowledge, we detected that the localized entities were not autoexposed so we exposed then manually in the service.cds of our CAP application:
entity Divisions_texts as select from MD.Divisions.texts;
This was done long time ago and has been working without issues until a couple of weeks ago. I think that removing this will fix the issue.
I'll remove and let you know.
Edit: The reason why the entity is exposed manually is that we have a UI application to maintain the translations. For that reason, autoexposed entities that are by default readonly were not valid so we exposed them manually, it seems the way we are doing it is now causing issues. Keep on investigating. Will update if I find the reason.
Thank you,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
11 | |
10 | |
8 | |
8 | |
6 | |
6 | |
6 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.