For includes, types and aspects (and actually also non-query entities) work the same: you get all elements (and actions) from the included thing, and inherit its annotations.Types, but not aspects:types can be used as type for elements and parameters...
Yes.The corresponding element in your projection is then considered read-only, of course: https://pages.github.tools.sap/cap/docs/guides/providing-services#readonly
First to the strange error message: thanks for the bug report (I added an issue to our internal CDS compiler GitHub issues). The issue is indeed that you removed the key element which is used for the generated up_ association, and the compile should...
The idea is that the user of the association provides the value, like in@cds.persistence.exists
@cds.persistence.udf
entity T( P: String ) {
key id: Integer;
}
entity E {
key id: Integer;
t: Association to T;
}
entity V as select from E {
id,...