SAP CAP Blog Posts
cancel
Showing results for 
Search instead for 
Did you mean: 
qmacro
Developer Advocate
Developer Advocate
1,284

The CDS compiler is a very capable mechanism and can advise and warn us if we present questionable design choices in our models. It can even refuse to continue in extreme circumstances.

Let's say we have a Book entity defined thus:

entity Book {
  key  id : String;
     isbn : String;
  content : String;
};

Then, in a service definition, we create a projection on that entity like this:

entity IsbnBook as projection on Book {
  *,
  isbn as id
};

The questionable design choice here is that with the isbn as id, we're effectively overwriting the id element that we're including by means of the * wildcard.

The compiler will issue a message with a severity level of Info for this. What is the message identifier (it is a three word phrase where the words are joined by dashes (-)?

This is a question from the June Developer Challenge on CAP Knowledge. And don't forget: always submit your answer as a hash, on its own - read the Taking part section of the intro post for more info. At the end of today, this question will be updated with links to further reading on this topic.

31 Comments