tortoise-orm
tortoise-orm copied to clipboard
side effects of pydantic_model_creator(SomeModel)
As an example,
Users_pydantic.from_queryset(Users.filter(is_active=True))
This query sometimes becomes so dangerous that It takes lot of time in fetching the data because of the relational data.
It returns all the data that is related to the foreign key of this Model.
Yes, what's your idea?
What's the alternate for this query?
I think It' solve with exlude in pydantic_model_creator
. If some fields are not needed for your task
What if we need to only return an object of a foreign key but it returns all its objects of other models as well which basically aren't directly linked with the base model. How we can exclude those nested objects?