Skip to content

docs: Document dynamic model fields#709

Merged
developerjamiu merged 3 commits into
serverpod:mainfrom
marcelomendoncasoares:docs/dynamic-fields
Jul 23, 2026
Merged

docs: Document dynamic model fields#709
developerjamiu merged 3 commits into
serverpod:mainfrom
marcelomendoncasoares:docs/dynamic-fields

Conversation

@marcelomendoncasoares

@marcelomendoncasoares marcelomendoncasoares commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Models, endpoint parameters, and return values support dynamic, but nothing documented it. This adds a page for it and wires it into the places a reader would look first.

Changes

  • Add a "Dynamic fields" page under Models, covering when to reach for dynamic over a typed field, the model file syntax, nullability, the supported value types, endpoint use, JSON and JSONB persistence, copyWith behavior, and the tradeoffs.
  • State that Serverpod carries runtime type metadata in the serialized value, and that the encoded form is an implementation detail.
  • Cover project, module, and shared package model boundaries.
  • Renumber the pages after it in the Models section.
  • Link dynamic from the model type list, the endpoint parameter types, the database data representation section, and the model reference.

Reference

@marcelomendoncasoares
marcelomendoncasoares marked this pull request as ready for review July 22, 2026 14:02
@developerjamiu developerjamiu added the documentation Improvements or additions to documentation label Jul 23, 2026
# Conflicts:
#	docs/06-concepts/02-endpoints-and-apis/01-working-with-endpoints.md
#	docs/06-concepts/02-endpoints-and-apis/08-backward-compatibility.md
#	docs/06-concepts/03-data-and-the-database/01-models/01-working-with-models.md
#	docs/06-concepts/03-data-and-the-database/01-models/03-custom-serialization.md
#	docs/06-concepts/03-data-and-the-database/01-models/03-vector-and-geography-fields.md
#	docs/06-concepts/03-data-and-the-database/01-models/04-custom-serialization.md
#	docs/06-concepts/03-data-and-the-database/01-models/04-shared-packages.md
#	docs/06-concepts/03-data-and-the-database/01-models/04-vector-and-geography-fields.md
#	docs/06-concepts/03-data-and-the-database/01-models/05-custom-serialization.md
#	docs/06-concepts/03-data-and-the-database/01-models/05-shared-packages.md
#	docs/06-concepts/03-data-and-the-database/01-models/06-backward-compatibility.md
#	docs/06-concepts/03-data-and-the-database/01-models/06-shared-packages.md
#	docs/06-concepts/03-data-and-the-database/01-models/07-backward-compatibility.md
#	docs/06-concepts/03-data-and-the-database/02-database/01-tables.md
#	docs/06-concepts/03-data-and-the-database/02-database/08-vector-and-geography-fields.md
#	docs/06-concepts/lookups/model-reference.md

@developerjamiu developerjamiu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@developerjamiu
developerjamiu merged commit d4b32e6 into serverpod:main Jul 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants