You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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