-
I'm trying to use pydantic with sqlalchemy in a fastapi project. My "stocks object" is:
This triggers a query, as expected, like so:
And I am returning the objects with:
The
Anyone know why is this the case? I did not know that this cast could cause SQL Alchemy to run extra queries. I don' t think this is an issue, so I am opening a discussion to see if I can make this work with a single query |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This can be deleted, it has nothing to do with pydantic, but with fastapi response model |
Beta Was this translation helpful? Give feedback.
This can be deleted, it has nothing to do with pydantic, but with fastapi response model