Skip to content

Conversation

@BobdenOs
Copy link
Contributor

@BobdenOs BobdenOs commented Aug 5, 2025

No description provided.

@@ -0,0 +1,7 @@
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move that to gen

@@ -0,0 +1,98 @@
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move that to gen

index.cds Outdated
using from './srv/workarounds';

// simulate cds export
annotate sap.capire.flights.data with @cds.external;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2b replaced by cds export

key date, // preserve the flight date as a key
*, // include all other fields from my.Flights
} excluding { flight };
} excluding { flight, date, free_seats };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Why excluding date? → it's a key btw → does that work at all?
  2. Why excluding free_seats?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this as the compiler was giving the following message. It was mostly added as a reminder.

Info[wildcard-excluding-one…]: This select item replaces “date” from table alias “Flights”. Add “date” to ‘excluding’ to silence this message
   |
  srv/data-products.cds:9:9-13, at entity:“sap.capire.flights.data.Flights”/query:1
   |
 9 |     key date, // preserve the flight date as a key
   |         ^^^^

Info[wildcard-excluding-one…]: This select item replaces “free_seats” from table alias “Flights”. Add “free_seats” to ‘excluding’ to silence this message
   |
  srv/workarounds.cds:5:37-47, at entity:“sap.capire.flights.data.Flights”/query:1
   |
 5 |   maximum_seats - occupied_seats as free_seats : Integer,
   |                                     ^^^^^^^^^^

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thanks for the background @BobdenOs

@stewsk : I'd recommend removing these info messages or just don't display info-level messages by default (as we do in cds compile). Reason (as frequently reiterated): such messages cause wrong reactions (see here, q.e.d.) or leads to broken window effects → devs not paying attention to compiler messages anymore at all (as in Nexus).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants