on 2018 Nov 13 10:50 AM
Hi
is a many-to-many association possible with cds?
I am working with the new SAP Cloud Platform Business Application programming model. I didn't find anything in the respective documentation.
A simplified example:
Entity Book
Entity Author
One Book can have many Authors. One Author can have many books.
Thanks for your Help!
Best regards,
Martin
Request clarification before answering.
Hello,
You I think you will need a entity to do the many-to-may relationship. For example:
entity Books{
key id: Integer;
name: String(100);
authors: Association to many BooksAuthors on authors.book = $self;
}
entity BooksAuthors{
key author: Association to Authors;
key book: Association to Books
}
entity Authors{
key id: Integer;
name: String(100);
books: Association to many BooksAuthors on books.author = $self;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Many thanks, balbino.soaresferreirafilho
Was looking for something like this.
Quick check -
"books: Association to many BooksAuthors on books.book=$self;"
Shouldn't the above condition be books.author=$self ?
Or perhaps, I'm missing something?
User | Count |
---|---|
86 | |
11 | |
8 | |
8 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.