diff options
| author | Simon Charette <charette.s@gmail.com> | 2025-03-19 01:11:34 -0400 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2025-09-14 00:27:49 +0200 |
| commit | 55a0073b3beb9de8f7c1f7c44a7d0bc10126c841 (patch) | |
| tree | 616a0bf54b0d9e3d09a2d033980f07bbb2a83e0d /docs/ref | |
| parent | c48904a225e2e8f02274257247d5b7d29c5fe183 (diff) | |
Refs #27222 -- Refreshed GeneratedFields values on save() initiated update.
This required implementing UPDATE RETURNING machinery that heavily
borrows from the INSERT one.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/models/fields.txt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index dd0862926a..f105096c8c 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -1315,12 +1315,6 @@ materialized view. PostgreSQL only supports persisted columns. Oracle only supports virtual columns. -.. admonition:: Refresh the data - - Since the database computes the value, the object must be reloaded to - access the new value after :meth:`~Model.save`, for example, by using - :meth:`~Model.refresh_from_db`. - .. admonition:: Database limitations There are many database-specific restrictions on generated fields that @@ -1338,6 +1332,12 @@ materialized view. .. _PostgreSQL: https://www.postgresql.org/docs/current/ddl-generated-columns.html .. _SQLite: https://www.sqlite.org/gencol.html#limitations +.. versionchanged:: 6.0 + + ``GeneratedField``\s are now automatically refreshed from the database on + backends that support it (SQLite, PostgreSQL, and Oracle) and marked as + deferred otherwise. + ``GenericIPAddressField`` ------------------------- |
