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

Add relationship cardinality constraints #68

Open
genedan opened this issue May 1, 2022 · 0 comments
Open

Add relationship cardinality constraints #68

genedan opened this issue May 1, 2022 · 0 comments
Labels

Comments

@genedan
Copy link
Collaborator

genedan commented May 1, 2022

SQLAlchemy can support cardinality constraints in the schema definition. While it would be nice to have these explicitly defined in the code, the way to do so in SQLAlchemy is somewhat not obvious (it is done via an order_by argument to the backref function to indicate one-to-many) - so I'm not sure how much more readable that will make the code unless the reader happens to be very familiar with SQLAlchemy.

Adding this issue here since if any future code needs to have these constraints explicitly defined, we'll need to add them anyway.

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

No branches or pull requests

1 participant