Replies: 1 comment
-
Yeah, we don't really support M2M within Pydantic yet. We need to figure out what a good API for it would be. You might want to expose the M2M in a separate endpoint. One option is to use |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
A feature like this is likely highly particular to the implementer's needs and am unsure how to implement it as piccolo and the piccolo api modules currently exist.
I'm unsure how to request the generated pydantic model to include the additional fields needed to save the m2m relations.
At the moment I would like to pass a list of IDs as a new model field that is then used to create the M2M relations. Likely the simplest interface. For others if they are storing more information in the M2M relation I can image they'd need to pass more data in that list.
Any ideas on how to implement?
Beta Was this translation helpful? Give feedback.
All reactions