Re: How to ignoring columns on model save

2022-06-28 Thread Ryan Nowakowski
On June 27, 2022 4:36:49 AM CDT, "ro...@tonic-solutions.com" wrote: >I know I could set `something like `instance.save(update_fields=[field for >field in instance._meta.fields if field.name != "_search")` but it would >need to be set on every save for that model throughout the application,

Re: How to ignoring columns on model save

2022-06-28 Thread Jason
https://code.djangoproject.com/ticket/21454 there's an open ticket about this, some things might help you there. But right now, there's no easy way to get around this On Monday, June 27, 2022 at 5:36:50 AM UTC-4 ro...@tonic-solutions.com wrote: > I have a model that is backed by a database ta

How to ignoring columns on model save

2022-06-27 Thread ro...@tonic-solutions.com
I have a model that is backed by a database table that contains a read-only column that is maintained by the database using Postgresql's Generated Columns (i.e. using GENERATED ALWAYS AS) - see https://www.postgresql.org/docs/current/ddl-generated-columns.html. When Django saves the model, it t