Skip to content

Commit

Permalink
fix: datetime2 rounding in mssql (#7264)
Browse files Browse the repository at this point in the history
This upgrades the `mssql` driver to version 7 to resolve #3202. This
issue was created in the bulk insert test adding a datetime2 field
with a time of midnight.

v7 no longer allows numeric parameter names and was throwing an error
inside tedious but you can see that `node-mssql` is expecting a string.
https://github.com/tediousjs/node-mssql/blob/76585f973dd8cad48836fe302f99f67d47ff6129/lib/base/request.js#L101
Another user saw this issue in the comments of issue #3202.
#3202 (comment)

Stringifying the numeric parameter names before it enters the driver
resolves this issue.

Now all mssql tests pass locally once you provide additional config in
`ormconfig.json` locally required for a locally running docker instance
of mssql which uses a self signed certificate.
```json
"extra": {
  "trustServerCertificate": true
}
```
  • Loading branch information
tgandrews authored Feb 6, 2021
1 parent c92ce76 commit 4711a71
Show file tree
Hide file tree
Showing 3 changed files with 171 additions and 114 deletions.
Loading

0 comments on commit 4711a71

Please sign in to comment.