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

fix: make EntityMetadataValidator comply with entitySkipConstructor #8445

Merged

Conversation

francescosalvi
Copy link
Contributor

@francescosalvi francescosalvi commented Dec 10, 2021

Fixes #8444

Description of change

See related issue #8444

Pull-Request Checklist

  • Code is up-to-date with the master branch
  • npm run lint passes with this change
  • npm run test passes with this change
  • This pull request links relevant issues as Fixes #0000
  • There are new or updated unit tests validating the change
  • Documentation has been updated to reflect this change (N/A)
  • The new commits follow conventions explained in [CONTRIBUTING.md]

@pleerock
Copy link
Member

Can we have this change test-covered, so we can make sure in the future this won't break? Thank you

@francescosalvi
Copy link
Contributor Author

@pleerock ok, I'll try

@francescosalvi francescosalvi force-pushed the bugfix/8444-entitySkipConstructor-fix branch from a581c4c to c7f285d Compare December 13, 2021 12:49
@francescosalvi francescosalvi force-pushed the bugfix/8444-entitySkipConstructor-fix branch from c7f285d to 5a959ea Compare December 14, 2021 07:51
@francescosalvi
Copy link
Contributor Author

@pleerock test added: I basically asserted that with and without the connection option, and the given entity, the connection should/should not be established (initially I defined an additional entity with the destructuring assignment in the constructor, but the error message seemed to differ among different Node versions, so I removed and only kept the current test entity where I assert that the passed parameter is not undefined)

@pleerock
Copy link
Member

I'm thinking to revert entitySkipConstructor feature at all because of the following issue: #8267

@pleerock
Copy link
Member

okay, let's merge it for now

@pleerock pleerock merged commit 3d6c5da into typeorm:master Feb 16, 2022
chriswep added a commit to chriswep/typeorm that referenced this pull request Feb 16, 2022
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.

entitySkipConstructor not working
2 participants