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: use full path for table lookups #8097

Merged
merged 4 commits into from Aug 24, 2021

Conversation

imnotjames
Copy link
Contributor

@imnotjames imnotjames commented Aug 18, 2021

Description of change

The changes made as part of #7575 fixed some issues and introduced others. The problem became that the table name would be compared against the EntityMetadata tablePath. This would fail in some cases because while the EntityMetadata would specify database, it'd be the "default"/current database & would be omitted from the table name.

To work around that this PR introduces the database & schema on the table objects as well as a fully-qualified table path property which will always include all of them for comparing against EntityMetadata.

fixes #8109
fixes #8102
fixes #7867
fixes #7812
fixes #7737
fixes #6744
fixes #5960
fixes #5958
fixes #5439
fixes #5304

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
  • The new commits follow conventions explained in CONTRIBUTING.md

@imnotjames imnotjames merged commit 22676a0 into typeorm:master Aug 24, 2021
nebkat pushed a commit to nebkat/typeorm that referenced this pull request Sep 27, 2021
The changes made as part of typeorm#7575 fixed some issues and introduced others. The problem became that the table name would be compared against the EntityMetadata tablePath. This would fail in some cases because while the EntityMetadata would specify database, it'd be the "default"/current database & would be omitted from the table name.

To work around that this PR introduces the database & schema on the table objects as well as a fully-qualified table path property which will always include all of them for comparing against EntityMetadata.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment