-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
SQLAlchemyFactory with foreign keys #551
Comments
Hi @vickypalani, could you try adding adding |
@vickypalani I think the solution mentioned above should work. If not, feel free to reopen the issue. |
Hi @adhtruong thanks for the response, @guacs sorry for not updating the status of the issue. I was able to resolve this after going through the documentation last week. This is how my factory looks right now,
|
Hi, I'm facing some trouble while creating factories that involve ForeignKeys in SQLAlchemy...
When I try to create an EmailCategory model instance, I get an IntegrityError mentioning that the random integer assigned to foreign key field is not present in the table "email_categories" (which is expected). Right now I'm passing the foreign_key values manually, like this
Is there any other way to implement the same?
Note
While we are open for sponsoring on GitHub Sponsors and
OpenCollective, we also utilize Polar.sh to engage in pledge-based sponsorship.
Check out all issues funded or available for funding on our Polar.sh dashboard
The text was updated successfully, but these errors were encountered: