-
Notifications
You must be signed in to change notification settings - Fork 90
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
Mass join for M2M fields #567
Comments
It's an interesting idea - thanks. I think we do need something like this. I'm just working my way through some other PRs at the moment, but hope to get to this soon! |
Any thoughts? ;-) |
@dantownsend |
@northpowered I've fixed the linter errors - the tests are running now. |
@dantownsend mb we can merge #566 ? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#566 PR
Adds join_m2m method for a Table class, which runs get_m2m() method for all M2M fields of object. Can be useful for
complex PyDantic models in READ actions. Returns empty list() for an attribute, if there are no relations to this object.
Optional, you can include or exclude fields to define which attrs should be joined. Setting either include_fields, and exclude_fields will raise AssertionError.
Model example:
Usage:
The text was updated successfully, but these errors were encountered: