Skip to content

Clarify deprecation or orUpdate - #8829

Merged
pleerock merged 2 commits into
typeorm:masterfrom
Jacse:master
Mar 31, 2022
Merged

pleerock merged 2 commits into
typeorm:masterfrom
Jacse:master

Conversation

@Jacse

@Jacse Jacse commented Mar 30, 2022

Copy link
Copy Markdown
Contributor

It would look like both onConflict and orUpdate were deprecated with no description on what to use or why

Description of change

With this change onConflict was deprecated in favour of orUpdate, but at the same time the "old" call signature of orUpdate was also deprecated. For people that are using the old call signature of orUpdate it now looks like both functions are deprecated with no explanation or alternative offered. This PR introduces a small message to clarify that it is only the one call signature that is deprecated, the function should still be used.

Pull-Request Checklist

  • Code is up-to-date with the master branch
  • npm run format to apply prettier formatting
  • npm run test passes with this change
  • This pull request links relevant issues as Fixes #0000 (N/A)
  • There are new or updated unit tests validating the change (N/A)
  • Documentation has been updated to reflect this change
  • The new commits follow conventions explained in CONTRIBUTING.md

@pleerock

Copy link
Copy Markdown
Member

if we go with this change, it's better to document what exactly to use instead.

@Jacse

Jacse commented Mar 31, 2022 •

Copy link
Copy Markdown
Contributor Author

Updated so the message now looks like
billede

I juggled with a few different ways to write it and this seemed like the best solution.

@pleerock
pleerock merged commit e58c796 into typeorm:master Mar 31, 2022
@pleerock

Copy link
Copy Markdown
Member

thank you!

@gempain

gempain commented Oct 4, 2022

Copy link
Copy Markdown

@Jacse how do you provide a WHERE condition after the ON CONFLICT DO UPDATE SET ... WHERE which is allowed in Postgres ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants