Skip to content

How to use DTO to "return relations" #710

Answered by jtraub
YuriAlessandro asked this question in Q&A
Discussion options

You must be logged in to vote

It doesn't show up there because when DTO factories are created Tortoise is not aware of relations. Internally the plugin uses tortoise.contrib.pydantic.pydantic_model_creator which can work with relations if models have been initialized before its invocation.

Please refer to Tortoise docs

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by provinzkraut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants