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: materialized path being computed as "undefined1." #8526

Merged
merged 10 commits into from Feb 16, 2022

Conversation

mschwebler-tgm
Copy link
Contributor

Description of change

When tree entities are saved implicitly (through another related entity which hasMany tree-entities and "cascade" set to true) the ORM generates materialized-path strings prefixed with undefined. Resulting in materialized paths like undefined1.2.3. This pull request fixes that. Root cause was that the materialized path always relies on the previously inserted entity mpath which is undefined for the root-tree-entity.

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 N/A
  • There are new or updated unit tests validating the change
  • Documentation has been updated to reflect this change N/A
  • [ x] The new commits follow conventions explained in CONTRIBUTING.md

when tree entities are saved implicitly (through another related entity which hasMany tree-entities and "cascade" set to true) the ORM generates materialized-path strings prefixed with "undefined". Resulting in mpaths like "undefined1.2.3"
@pleerock
Copy link
Member

please remove .only to make sure all tests are passing

@pleerock
Copy link
Member

unfortunately Oracle tests are failing

@pleerock pleerock merged commit 09f54e0 into typeorm:master Feb 16, 2022
@pleerock
Copy link
Member

Thank you for contribution! 🎉

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.

None yet

2 participants