-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathservices.cds
41 lines (33 loc) · 927 Bytes
/
services.cds
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// removed the key and decorated each of the entities with aspects
// aspects for entities with canonical user id
// using from '@sap/cds-common-content';
// using { cuid, managed } from '@sap/cds/common';
aspect cuid {
key ID : UUID;
}
// service bookshop {
// entity Books : cuid {
// title : String;
// author : Association to Authors;
// }
// entity Authors : cuid {
// name : String;
// }
// }
service bookshop {
entity Books : cuid {
//one book - one author
title : String;
author_ID: type of Authors:ID;
author: Association to Authors on author.ID = author_ID;
}
entity Authors : cuid {
//one author - many books
name : String;
books: Association to many Books on books.author = $self;
}
}
// service banana {
// //
// entity something as projection on bookshop.Books {title}
// }