Closed mrharpo closed 1 year ago
This is not a bug - you are expecting SQLModel relations to be created, but the pydantic factory doesnt know what these are - its not a pydantic entity at all, but an SQLModel specific thing. There needs to be a special SQLModel factory for this to work, which currently there isnt. It can be a feature request of course.
Closed by #369.
Description
Adapting the pets example from the documentation to SQLModel, does not generate sub-factories as expected when using
Relationship
, despite explicitly callingUse
. Foreign keys are auto-generated correctly.Passing in a pre-built sub-model to the parent factory works as expected.
URL to code causing the issue
No response
MCVE
Working
Not working
Steps to reproduce
Screenshots
No response
Logs
No response
Starlite Version
Platform