Reproduce MSSQL Trigger bulkCreate Output Failure - #302
Open
klondikemarlen wants to merge 6 commits into
Open
Conversation
A trigger-bearing model emits OUTPUT without INTO during bulk creation, causing SQL Server error 334. This SSCCE preserves the generated-ID assertion so CI independently captures the failure.
Pin the v7 core and standalone MSSQL dialect packages to the reported application version.
Translate the existing CI connection settings to Sequelize v7 alpha.48 and its standalone MSSQL dialect package.
Avoid optional chaining in the shared instance helper so Node 10 can skip the v7-only SSCCE before loading the alpha.48 runtime.
Use SQL Server 2022’s mssql-tools18 client and trust its self-signed local certificate for health checks and database bootstrap.
Keep CI focused on the v7 MSSQL trigger reproduction.
klondikemarlen
marked this pull request as ready for review
August 14, 2026 02:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
A Sequelize v7 MSSQL model declares
hasTrigger: true, butbulkCreatestill emits anOUTPUT INSERTEDclause that SQL Server rejects for a table with an enabled trigger. This PR is an executable SSCCE; per this repository’s README, it is intended to remain open as CI evidence rather than be merged.Implementation
The branch pins
@sequelize/coreand@sequelize/mssqlto the affected7.0.0-alpha.48release, configures the standalone MSSQL dialect, and creates one identity model plus a realAFTER INSERTtrigger.bulkCreatethen asserts its generated ID. The unused v6 template is removed so only the MSSQL v7 scenario runs. SQL Server 2022 startup uses itsmssql-tools18client with-C; this permits CI to reach the reproduction.Screenshots
N/A — CLI/database reproduction.
Testing Instructions
Run yarn start-mssql-latestsucceeds.Execute SSCCEemitsINSERT INTO [trigger_bulk_create_test] ([name]) OUTPUT INSERTED.[id], INSERTED.[name] VALUES (N'trigger test');and SQL Server error 334.Review and QA Status
PASS — local
corepack yarn run start-mssql-latestreached a healthy database and passed the connection check. Localcorepack yarn test:mssqlreached the actual trigger and reproduced error 334 with the emitted SQL. The upstream CI run reproduced the same error in MSSQL 2017 and 2022 on Node 18 and 20 after successful database startup.corepack yarn test:sqliteskipped without loading a v6 template.git diff --checkpassed. The full matrix is red by design for the target reproduction and has unrelated legacy PostgreSQL failures.Learner Coverage
No action — a database-specific third-party ORM defect does not indicate an OMP Learner capability gap.