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

Implement support for self-relations in the provider #2

Open
5 tasks
juliano-soares opened this issue Jul 23, 2023 · 0 comments
Open
5 tasks

Implement support for self-relations in the provider #2

juliano-soares opened this issue Jul 23, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@juliano-soares
Copy link
Member

Description:

In this task, you implement support for self-relationships in the provider. A self-relationship occurs when a relationship field in a model references the model itself. These eigenrelations can be of any cardinality, such as 1-1 (one to one), 1-n (one to many), and m-n (many to many).

Prisma Documentation - self-relations

Tasks:

  • Analyze the current provider structure and identify relevant areas that need to be modified or improved to support self-relationships.
  • Create test cases for different self-relationship scenarios, including 1-1, 1-n, and m-n. Tests must ensure that self-relationships work correctly and that data is stored and retrieved properly.
  • Implement the necessary modifications to the provider to handle self-relationships. This may involve tweaking models, queries, and create and update operations.
  • Update provider documentation to include information on how to use self-relationships, explaining changes made and providing clear examples.
  • Perform extensive testing to ensure support for self-relationships has not negatively impacted other provider features.

Acceptance Criteria:

  • The provider must be able to create, retrieve, update, and delete models that contain self-relationships, regardless of relationship cardinality.
  • Tests should cover 1-1, 1-n, and m-n eigenrelation scenarios, and should pass without errors.
  • Documentation should be updated to include information about self-relationships, explaining how to use them and providing relevant examples.
  • All code modifications and additions must be accompanied by explanatory comments, following existing code style guidelines.

Final remarks:

Remember to coordinate with other team members, if necessary, to ensure there are no conflicts with other features under development. When finalizing the implementation, submit the pull request (PR) request for peer code review. Be sure to perform additional testing after code review before merging into the main provider repository.

@juliano-soares juliano-soares added the enhancement New feature or request label Jul 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant