-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
NativeScript Query Runner has a scope issue in its query() method #8180
Labels
Comments
pekevski
added a commit
to pekevski/typeorm
that referenced
this issue
Sep 14, 2021
…iptQueryRunner. this.driver is not defined. Making the promise async now correctly scopes the handler. Additional corrections were made to the syntax, eg conditionals.
pekevski
added a commit
to pekevski/typeorm
that referenced
this issue
Sep 14, 2021
…iptQueryRunner. this.driver is not defined. Making the promise async now correctly scopes the handler. Additional corrections were made to the syntax, eg conditionals.
pekevski
added a commit
to pekevski/typeorm
that referenced
this issue
Sep 14, 2021
…iptQueryRunner. this.driver is not defined. Making the promise async now correctly scopes the handler. Additional corrections were made to the syntax, eg conditionals.
pekevski
added a commit
to pekevski/typeorm
that referenced
this issue
Sep 14, 2021
…iptQueryRunner. this.driver is not defined. Making the promise async now correctly scopes the handler. Additional corrections were made to the syntax, eg conditionals.
pekevski
added a commit
to pekevski/typeorm
that referenced
this issue
Sep 14, 2021
…iptQueryRunner. this.driver is not defined. Making the promise async now correctly scopes the handler. Additional corrections were made to the syntax, eg conditionals.
pekevski
added a commit
to pekevski/typeorm
that referenced
this issue
Sep 14, 2021
…r.ts Making the promise async now correctly scopes the handler. this.driver is now defined. Additional corrections were made to the syntax, eg conditionals. Closes typeorm#8180
Sorry (cant amend commit messages very well) 😢 |
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue Description
NativescriptQueryRunner handler function inside promise has an issue with scoping of "this". I think it may occur when targeting a higher es module than commonjs?
Expected Behavior
TypeORM will run with a nativescript-sqlite database without any issues on startup.
(Assuming all of TypeORM's node poly fills have been added as NativeScript 8 now runs on webpack v5)
Actual Behavior
When using TypeORM v0.2.37 in a NativeScript 8 project with a TypeScript configuration
The app does not start and throws the following error. Suggesting that
this
is undefined. in the NativescriptQueryRunner.ts file as below:Steps to Reproduce
npm i -g nativescript
(should be version 8.1.1 of writing this)https://github.com/pekevski/typeorm-ns8-ng-example.git
package.json
set typeorm to0.2.37
ns run ios
orns run android
My Environment
Additional Context
None
Relevant Database Driver(s)
aurora-data-api
aurora-data-api-pg
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
sqlite
sqlite-abstract
sqljs
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
The text was updated successfully, but these errors were encountered: