docs: declare table fields with @Field and @Relation decorators in examples - #10
Merged
Conversation
Member
Author
|
@greptile review |
Member
Author
|
@greptile review |
Upd4ting
approved these changes
Jul 13, 2026
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
The table-declaring examples in the docs predate the
@Field/@Relationdecorators and still teach the legacy style (baredeclarefields). Since properties without@Fieldare omitted from theTableDefinition.fieldsmap handed to the adapter, the examples produced tables with no field definitions.@Field(type)added on every column in every example (docs/2.table-definitions.md,docs/3.table-modifiers.md).@Relation({ to: () => User })added on the foreign-key fields (UserActivity.userId,Post.authorId), consistent with the file's own Relation section.declarekeyword" with no mention of@Field.Only the sections dedicated to
@Fieldand@Relationthemselves were already up to date; everything else is aligned on the same conventions (@Index→@Field→@Relation,@Field(\"any\")for object payloads,@Field(\"date\")for dates).Greptile Summary
This PR updates the table documentation to show the current decorator-based table style.
@Fielddecorators to table fields in the examples.@Relationdecorators to foreign-key examples.Confidence Score: 5/5
This looks safe to merge.
Important Files Changed
@Field, relation metadata, and the imports needed by the shown snippets.@Field.Reviews (3): Last reviewed commit: "docs: address greptile review feedback (..." | Re-trigger Greptile