-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
docs: fix docs for UpdateDateColumn #11572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe docs were updated to state that Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Pre-merge checks (3 passed)✅ Passed checks (3 passed)
Poem
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
✨ Finishing touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (7)
docs/docs/working-with-entity-manager/5-entity-manager-api.md (1)
199-200: Tighten the note & spell out the implicit behaviourA quick wording/clarity win: explicitly name what “current values” means, so the reader doesn’t have to infer which values are written.
-**Note:** When an upsert operation results in an update (due to a conflict), special columns like `@UpdateDateColumn` and `@VersionColumn` are automatically updated to their current values. +**Note:** When an upsert operation performs an update (due to a conflict), TypeORM automatically +· sets `@UpdateDateColumn` to the current timestamp, and +· increments `@VersionColumn`.docs/docs/help/3-decorator-reference.md (2)
283-284: Mirror wording used elsewhere for consistencyMinor stylistic tweak so the phrasing matches the other docs you touched (“performs an update” instead of “when an update occurs”) and keeps the “due to a conflict” qualifier that explains why an update happens.
-**Note:** This column is also automatically updated during `upsert` operations when an update occurs due to a conflict. +**Note:** This column is also automatically updated during `upsert` operations that perform an update due to a conflict.
315-316: Apply the same phrasing to the VersionColumn sectionKeeping the two notes identical helps downstream translators & avoids docs drift.
-**Note:** This column is also automatically updated during `upsert` operations when an update occurs due to a conflict. +**Note:** This column is also automatically updated during `upsert` operations that perform an update due to a conflict.docs/docs/entity/1-entities.md (2)
174-176: Small grammar & flow polishReplace the comma splice with an em-dash and reuse the “performs an update” wording.
-each time you call `save` of entity manager or repository, or during `upsert` operations when an update occurs. +— each time you call `save` on the entity manager or repository, **or** during `upsert` operations that perform an update.
179-181: Keep wording identical to UpdateDateColumn paragraphSame reasoning as above; suggest mirroring exact wording.
-each time you call `save` of entity manager or repository, or during `upsert` operations when an update occurs. +— each time you call `save` on the entity manager or repository, **or** during `upsert` operations that perform an update.docs/docs/working-with-entity-manager/6-repository-api.md (2)
155-156: Spell out what “current values” meansSame micro-clarification as in the EntityManager docs.
-**Note:** When an upsert operation results in an update (due to a conflict), special columns like `@UpdateDateColumn` and `@VersionColumn` are automatically updated to their current values. +**Note:** When an upsert operation performs an update (due to a conflict), TypeORM automatically sets `@UpdateDateColumn` to the current timestamp and increments `@VersionColumn`.
170-173: Nit: keep example SQL fully validIn Postgres
CURRENT_TIMESTAMPusually lives outside quotes; since this is a doc comment it’s fine, but adding a comma after the lastSETline makes the example invalid SQL. Consider dropping the trailing comma so copy-paste works.- * SET firstName = EXCLUDED.firstName, - * updatedDate = CURRENT_TIMESTAMP, - * version = version + 1 + * SET firstName = EXCLUDED.firstName, + * updatedDate = CURRENT_TIMESTAMP, + * version = version + 1(Only the final line should lack the trailing comma.)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
docs/docs/entity/1-entities.md(1 hunks)docs/docs/help/3-decorator-reference.md(2 hunks)docs/docs/working-with-entity-manager/5-entity-manager-api.md(1 hunks)docs/docs/working-with-entity-manager/6-repository-api.md(2 hunks)
sgarner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @madhugb
docs: remove "Note" prefix from Repository.upsert text
gioboa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @madhugb for your amazing help 👏
Description of change
After we fixed the
@UpdateDateColumnissue withupsertwith #10458, we have not updated the documentationThis PR updates the relevant docs for
upsertwhere required.Pull-Request Checklist
masterbranchFixes #00000Summary by CodeRabbit