File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22 Common Annotations shared by all apps
33*/
44using {my .bookshop as my } from ' ../db/index' ;
5+ using {sap .common as common } from ' @sap/cds/common' ;
56
67
78////////////////////////////////////////////////////////////////////////////
@@ -158,8 +159,6 @@ annotate my.Reviews with {
158159 Text : book.title,
159160 TextArrangement : #TextOnly
160161 };
161- date
162- @title : '{i18n>Date}';
163162 rating
164163 @title : '{i18n>Rating}';
165164 text
@@ -382,26 +381,10 @@ annotate common.Currencies with
382381 {Value : descr}
383382 ]},
384383 FieldGroup #Extended : {Data : [
385- {Value : numcode},
386- {Value : minor},
387- {Value : exponent}
384+ {Value : minorUnit}
388385 ]},
389386});
390387
391-
392- ////////////////////////////////////////////////////////////////////////////
393- //
394- // Currencies Elements
395- //
396- annotate common.Currencies with {
397- numcode
398- @title : '{i18n>NumCode}';
399- minor
400- @title : '{i18n>MinorUnit}';
401- exponent
402- @title : '{i18n>Exponent}';
403- }
404-
405388////////////////////////////////////////////////////////////////////////////
406389//
407390// Fiori requires generated IDs to be annotated with @Core.Computed
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ entity Reviews : cuid, managed {
1717
1818// input validation
1919annotate Reviews with {
20- subject @ mandatory ;
2120 title @ mandatory ;
2221 rating @ assert . range ;
2322 book @ mandatory @ assert . target ;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ using {my.bookshop as my} from '../db/index';
33
44@ path : ' admin '
55service AdminService @ (requires : ' admin ' ) {
6- entity Books as projection on my .Books actions {
6+ entity Books as projection on my .Books excluding { reviews } actions {
77 action addToOrder (order_ID : UUID , quantity : Integer ) returns Orders ;
88 }
99
You can’t perform that action at this time.
0 commit comments