Hello,
I'm trying to create some entities in CDS for my existing database schema to use it in model-driven applications. I want to do it from scratch (and not use the "Get Data" option).
Here are my questions:
Question 1:
I have modeled a many-to-many relationship between entity A and entity B. But I don't know how to insert data for this relationship because I don't have a form or view for it. (Normally I would think that a third entity is created with the relationship name).
How can you get/insert data for this relationship?
Question 2:
I also want to create a view that contains data from more than one table, even if the tables have no direct relationship.
So I would join the tables in SQL, but when I want to create a view in CDS, I can only select related fields.
For example, I have a "likes" table with the data:
Person A; Person B;
Anna; Peter
Peter; Anna
Mike; Peter
Anna; Mike
and only want to get rows where people like each other (output should be Anna, Peter; Peter).
How to create such a view with CDS?