docs: Document dynamic model fields#709
Draft
marcelomendoncasoares wants to merge 4 commits into
Draft
Conversation
The JSONB links pointed at a database/models page that does not exist, and the Related entry named it in terms the page never introduced. Also drop the redundant sidebar_label, fold the dynamic note on the tables page into the sentence it belongs to instead of splitting a paragraph, and flag serializationDataType before the example that uses it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
dynamicover a typed field, the model file syntax, nullability, the supported value types, endpoint use, JSON and JSONB persistence,copyWithbehavior, and the tradeoffs.dynamicfrom the model type list, the endpoint parameter types, the database data representation section, and the model reference.Reference
dynamicfields on models and endpoints serverpod#5013copyWithmethod ondynamicfields serverpod#5146, fix: Fixdynamicdata being serialized as an encoded string serverpod#5153, fix: Fix serialization/deserialization of project models ondynamicfields of module models serverpod#5157, fix: Fix the serialization ofdynamicclasses when importing both client and server serverpod#5201🤖 Generated with Claude Code