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

Switching to esnext - fields not part of "select" are returned with "undefined" #10885

Open
1 of 18 tasks
brianzinn opened this issue May 11, 2024 · 0 comments
Open
1 of 18 tasks

Comments

@brianzinn
Copy link

Issue description

esnext compatibility

Expected Behavior

I was expecting switching from ES2020 to ESNext to have no impact

Actual Behavior

I am noticing that relations that are not loaded and fields that are not part of select (and are not queried - i checked the query). When the transformer applies the loaded data to an entity - it adds the extra fields unnecessarily. I am only switching the target version in my tsconfig.

Steps to reproduce

"typeorm": "^0.3.20",
"sqlite3": "^5.0.2",
"ts-node": "^10.8.0",

My Environment

Dependency Version
Operating System
Node.js version v18.12.1
Typescript version 5.4.5
TypeORM version 0.3.20

Additional Context

No response

Relevant Database Driver(s)

  • aurora-mysql
  • aurora-postgres
  • better-sqlite3
  • cockroachdb
  • cordova
  • expo
  • mongodb
  • mysql
  • nativescript
  • oracle
  • postgres
  • react-native
  • sap
  • spanner
  • sqlite
  • sqlite-abstract
  • sqljs
  • sqlserver

Are you willing to resolve this issue by submitting a Pull Request?

No, I don’t have the time and I’m okay to wait for the community / maintainers to resolve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant