-
**Describe the bug**
数据库字段设置`null=True`时,通过`pydantic_model_creator`还是要必填。
When the database field is set to `null=True`, use `pydantic_model_creator` is still required.
**To Reproduce**
```
class…
-
ChatGPT's take:
Creating Pydantic models from Tortoise ORM models can be convenient because it allows you to reuse the same class definitions and avoid duplicating code. Additionally, Pydantic mode…
-
```
# aerich init -t project.settings.DATABASE
...
File "/usr/local/lib/python3.11/site-packages/aerich/cli.py", line 205, in init
doc["tool"]["aerich"] = table
~~~^^^^^^^^
File "/u…
-
**Describe the bug**
I've setup a ForeignKey field and appropriate model. When fetching the object I can't access the object under the ForeignKey field. Using .fetch_related says relation not found.
…
-
In app folder I have somethings organized like this:
main_app
--app1
----models.py
----views.py
----......
--app2
----models.py
----views.py
----.....
--core
----config.py
----tortoise.py
…
-
### Problem
Beginners don't understand the relationship when they use `tortoise-orm` for the first time.
For example `One-to-one`, `One-to-many`, `Many-to-many` connections.
### Solution
Most engi…
-
When i use fastapi with tortoise-orm, how to print sql log to console? I connect to MySQL, I use the optional config echo=true, but it is not useful?
`
TORTOISE_ORM = {
"connections": {
…
-
**Describe the bug**
I've created models like in this tutorial https://tortoise-orm.readthedocs.io/en/latest/models.html#inheritance and trying retrieve object of child class (from example it's UserM…
-
How can i print sql with register_tortoise() in fastapi?
-
Thinking longer term:
It's likely that we will need a reflection in the graphql schema to a database.... There are options out there such as https://github.com/graphql-python/graphene-sqlalchemy ho…