Which is a valid way to extend the entity with the aspect?

Your CAP project contains an entity called Books. You want to extend the Books entity with the managed aspect.

You have already imported the aspect from the ‘@sap/cds/common’ package (see code).

using {managed} from ‘@sap/cds/common’;

Which is a valid way to extend the entity with the aspect?
A . entity Books {
key ID: UUID @(Core.computed: true);
title: String;
author: String;
}
B . entity Books: managed {
key ID: UUID @(Core.Computed: true);
title: String;
author: String;
}

C . entity Books: {
key ID: UUID @(Core.Computed: true);
title: String;
author: String;
}
aspect managed Books{}
D . entity Books: {
key ID UUID (Core.Computed: true);
title: String;
author: String;
aspect managed;
}

Answer: B

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments