Replies: 1 comment 2 replies
-
Hi, I've tried the example locally and used Are you able to instantiate these models not using a factory? It may be missing a link between these relationships |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I just started to look into
polyfactory
for mock data generation for my database model. I think I ran into an issue with regards to association tables to model many-to-many relationships (creating batch data for the example model without the relationships works). I attached my code below.The model idea is simple: There are many projects and many users. Each project has a list of users and each user can work for a list of projects - thus the association table. I took the example from the sqlalchemy docs.
When I run the code I get the following error:
I also tried to create factories for Project and User to generate the data this way (with
set_relationships
disabled) but it's raising the same error.Beta Was this translation helpful? Give feedback.
All reactions