Skip to content
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

Clarify deprecation or orUpdate #8829

Merged
merged 2 commits into from Mar 31, 2022
Merged

Clarify deprecation or orUpdate #8829

merged 2 commits into from Mar 31, 2022

Conversation

Jacse
Copy link
Contributor

@Jacse Jacse commented Mar 30, 2022

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
Member

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

@Jacse
Copy link
Contributor Author

Jacse commented Mar 31, 2022

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
Member

thank you!

@gempain
Copy link

gempain commented Oct 4, 2022

@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants