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

Question: Master Detail document #352

Open
cloudkompute opened this issue Oct 1, 2019 · 2 comments
Open

Question: Master Detail document #352

cloudkompute opened this issue Oct 1, 2019 · 2 comments

Comments

@cloudkompute
Copy link

cloudkompute commented Oct 1, 2019

Hi

Is it possible to create a master-detail document meaning for the "master" data (comprising of few fields) there can exist "many" records in the "detail" data i.e. a document that supports 1-N?

If not, how can I achieve this? Any hints please.

With Regards
Raman

@cloudkompute
Copy link
Author

One more question.. I am looking forward to create a small ERP like solution. In such an application, Quotation for example, has a master-detail relationship.

Is it possible to develop it using Prime? If yes, could anybody guide me how to proceed?

@birkir
Copy link
Owner

birkir commented Oct 4, 2019

Prime supports 1-to-1, 1-to-many and many-to-many relationships.

You can create two schemas that reference one or multiple instances of each other as a field.

Example:

type Book {
  authors: [Author];
}

type Author {
  books: [Book];
}

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

2 participants