Skip to content

docs: Added warning for using ignoreConflicts on models with non persistant fields#436

Merged
marcelomendoncasoares merged 2 commits intoserverpod:mainfrom
FXschwartz:db-on-conflict
Mar 4, 2026
Merged

docs: Added warning for using ignoreConflicts on models with non persistant fields#436
marcelomendoncasoares merged 2 commits intoserverpod:mainfrom
FXschwartz:db-on-conflict

Conversation

@FXschwartz
Copy link
Contributor

@marcelomendoncasoares Additional requested warning added!

Copilot AI review requested due to automatic review settings March 3, 2026 18:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds documentation for using ignoreConflicts during batch inserts, including behavior notes and performance caveats when models contain non persistent (non-persist) fields.

Changes:

  • Documented ignoreConflicts: true usage for insert and its return behavior.
  • Added a note explaining PostgreSQL ON CONFLICT DO NOTHING semantics and which errors are/aren’t ignored.
  • Added a warning about per-row inserts (and potential performance impact) when models include non persistent fields.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@marcelomendoncasoares marcelomendoncasoares left a comment

Choose a reason for hiding this comment

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

Thanks for the addition, @FXschwartz! LGTM 💯

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants