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

Support mappers #15

Open
lyz-code opened this issue Dec 30, 2020 · 4 comments
Open

Support mappers #15

lyz-code opened this issue Dec 30, 2020 · 4 comments

Comments

@lyz-code
Copy link
Owner

Description

It would be nice if the repositories could load a schema to understand the relationship between entities.

In this schema we could define the following relationships:

  • One to one
  • One to many
  • Many to many

In a way that when we .get an object we get the option to load the mappers, and if they are, the repo will get the required objects and load them in the specified attribute.

Possible Solution

At repo initialization, a schema attribute is set with the desired relationships.

Then we will need to decide how it affects the different base methods.

Additional context

Related Issue

@lyz-code
Copy link
Owner Author

lyz-code commented May 2, 2021

Check how ODMantic has solved it

@lyz-code
Copy link
Owner Author

lyz-code commented May 3, 2021

Also remove the skip of the test_repo_can_search_in_list_of_str_attribute test

@lyz-code
Copy link
Owner Author

I've started working on the feat/add-relationships branch in case anyone want's to follow this path

@lyz-code
Copy link
Owner Author

Check how ormar has solved it

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

1 participant