Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create relationships between entities #336

Closed
deepspraj opened this issue Oct 4, 2022 · 3 comments
Closed

How to create relationships between entities #336

deepspraj opened this issue Oct 4, 2022 · 3 comments

Comments

@deepspraj
Copy link

I do have around 15 entities and want to create relationship between those.
I was able to create entity.cdm.json file using MS Documentation but entity.cdm.json in cdm's github repository have "foreignKeyAttribute" clause.
Tried to figure exactly how this clause came but was unable to do. As there are few blogs and videos on internet regarding cdm and none talks about creating relationship for entities.
Can you please guide me on this ??

Thank You !!

@deepspraj deepspraj changed the title How to create relation ships between entites How to create relationships between entities Oct 4, 2022
@llawwaii
Copy link
Contributor

llawwaii commented Oct 4, 2022

Hi @deepspraj, please take a look at this sample; however, please note Attribute Resolution Guidance is being deprecated in favor of Projections, learn more here.

more useful links: https://learn.microsoft.com/en-us/common-data-model/sdk/projections/replaceasforeignkey
https://github.com/microsoft/CDM/tree/master/samples/8-logical-manipulation-using-projections

Hope this can help. Feel free to ask more questions.

@Venkata1920
Copy link
Collaborator

Closing this issue as there has been no update. Please re-activate if there are additional queries / issues with creating relationships

@deepspraj
Copy link
Author

@llawwaii Thank you for guiding us.
As stated by you the sample no 6 is supported by C# and Java. Can you please show me the path where I can get to know how to generate relationships between entities using Python?

When we create relationships in manifest file is it necessary to mention primary and foreign key attribute in entity.cdm.json file ?
And when we try to generate relationship between entities using C# code in manifest file, this code doesn't create entity.cdm.json file respectively for entities but updates the manifest file with partition status of each entity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants