Replies: 1 comment
-
|
No, you are understanding it wrong. Check here https://tortoise.github.io/_modules/tortoise/fields/data.html#IntField |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am using sqlite and would like to have a few columns being generated from a json field.
According to https://tortoise.github.io/fields.html#tortoise.fields.base.Field.allows_generated I should set allows_generated=True and set GENERATED_SQL, but I could not find any example.
This works fine in the sqlite3 console
However the following model ignores the "team" column
I have also tried to assign "as (json_extract(tags, '$.team'))" similar to GENERATED_SQL, however that field is always NULL.
Any idea?
sqlite documentation: https://www.sqlite.org/gencol.html
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions