Skip to content

Conversation

@conorjhughes
Copy link

Pull Request Checklist

  • Have you added new tests to prevent regressions?
  • If a documentation update is necessary, have you opened a PR to the documentation repository?
  • Did you update the typescript typings accordingly (if applicable)?
  • Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • Does the name of your PR follow our conventions?

Description of Changes

Adds a new property returning to the DestroyOptions interface.

List of Breaking Changes

None.

@conorjhughes conorjhughes requested a review from a team as a code owner September 19, 2025 11:44
@WikiRik
Copy link
Member

WikiRik commented Sep 29, 2025

I couldn't find any tests for the returning property, nor a mention of this feature. Are you sure this is supported?

@conorjhughes
Copy link
Author

@WikiRik It works when paranoid is enabled, but this is a side effect (a "happy accident") because destroy calls bulkUpdate in that case.

result = await this.queryInterface.bulkUpdate(

I can add a test for this if you're happy with this logic existing as-is?

I also need to update the return type of destroy to reflect returning.

): Promise<number>;

@WikiRik
Copy link
Member

WikiRik commented Sep 30, 2025

I think in that case we should add an overload that's only active if paranoid is enabled and adds the BulkUpdateOptions. Unfortunately this part still has quite some work to do in terms of typing, so we'll see how much we can tackle in this PR.

It would be great if you could add tests that check the call to bulkUpdate when paranoid is enabled

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.

2 participants