Skip to content

Conversation

@christian-forgacs
Copy link
Contributor

@christian-forgacs christian-forgacs commented May 2, 2022

Fixes: #8892
May be fix: #8045

Fix wrong entity transform of relation id when referenced column is also a primary key.

Description of change

Only create value map if column isn't a primary key.

Pull-Request Checklist

  • Code is up-to-date with the master branch
  • npm run format to apply prettier formatting
  • 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
    • No changes needed because bugfix
  • The new commits follow conventions explained in CONTRIBUTING.md

@christian-forgacs christian-forgacs changed the title fix: wrong entity transform of relation id when referenced column is … fix: wrong entity transform of relation id when referenced column is a primary key May 2, 2022
@christian-forgacs
Copy link
Contributor Author

@pleerock any estimate when somebody from your team can review this fix? We had a big project and we add more and more workarounds in our project to fix this issue. I don't want to stress. It's only a question :)

@pleerock
Copy link
Member

I had to simplify your test to be able to understand the problem better. So yes, I can say the solution fixes the problem, however it touches very fragile code in the codebase, which obviously needs to be better than what we currently have.

I'll merge this PR. Thanks for the contribution.

@pleerock pleerock merged commit 6e888dd into typeorm:master Jun 29, 2022
@f-wrobel f-wrobel mentioned this pull request Jan 11, 2023
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants