on 04-11-2018 7:39 PM
Hi experts,
I have a Technology table and a Project table. The relationship between two of them are many-to-many. A project can used multiple technologies and a technology can be used in different projects. Thus I also have a relationship table Project_Technology. Its primary keys are PId and TId. I created a xsodata file to expose the data. However I'm getting syntax error on the association. Any thoughts would be helpful.
service {
"PROJECT_EXPLORER"."Technology" as "Technologies";
"PROJECT_EXPLORER"."Project" as "Projects" navigates ("Projects_Technologies" as "Has");
association "Projects_Technologies" with referential constraint principal "Projects"("Id") multiplicity "*" dependent "Technologies"("Id") multiplicity "*"
over "PROJECT_EXPLORER"."Project_Technology" principal ("PId") dependent ("TId");
}
Hi
Are you doing this on XSC or XSA?
Here is a sample from the Hana Developer Guide that is know to work:
service {
"sample.odata::customer" as "Customers";
"sample.odata::order" as "Orders";
association "Customer_Orders"
principal "Customers"("ID") multiplicity "*"
dependent "Customers"("ID") multiplicity "*"
over "sample.odata::knows" principal ("KnowingCustomerID") dependent ("KnownCustomerID");
}
Main differences are: no navigates clause and the table name references using colon notation.
Have you tried removing the navigates clause? And what about the table names?
Regards,
Ivan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ivan,
I'm doing this on XSA.
I actually looked into this example from the documentation. This example defines a many-to-many association with two same entities. But I am trying to define an association between two different entities. And associations need to be bound to entities by a NavigationProperty.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.