Skip to content

fix(pinia-orm): @OnDelete on same model attrs leads to undefined error#754

Merged
CodeDredd merged 2 commits intonext-releasefrom
pinia-orm-748
Dec 21, 2022
Merged

fix(pinia-orm): @OnDelete on same model attrs leads to undefined error#754
CodeDredd merged 2 commits intonext-releasefrom
pinia-orm-748

Conversation

@CodeDredd
Copy link
Copy Markdown
Owner

@CodeDredd CodeDredd commented Dec 21, 2022

🔗 Linked issue

closes #748

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

If you have the name attributes with diffrent behaviour and using onDelete it causes an error because the attribute names are registered on model level instead for the entity itself.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@CodeDredd CodeDredd added the bug Something isn't working label Dec 21, 2022
@CodeDredd CodeDredd self-assigned this Dec 21, 2022
@CodeDredd CodeDredd changed the title fix(pinia-orm): @OnDelete and Attr(object) leads to undefined error fix(pinia-orm): @OnDelete with same model attrs leads to undefined error Dec 21, 2022
@CodeDredd CodeDredd changed the title fix(pinia-orm): @OnDelete with same model attrs leads to undefined error fix(pinia-orm): @OnDelete on same model attrs leads to undefined error Dec 21, 2022
@CodeDredd CodeDredd merged commit 5aa18b5 into next-release Dec 21, 2022
@CodeDredd CodeDredd deleted the pinia-orm-748 branch December 21, 2022 14:09
@CodeDredd CodeDredd mentioned this pull request Dec 21, 2022
CodeDredd added a commit that referenced this pull request Dec 22, 2022
* perf(pinia-orm): Improve hydrating check (#679)

* perf(pinia-orm): Improve hydrating check

* perf(pinia-orm): add checking for composite keys

* refactor(pinia-orm): remove not needed update prop

* refactor(pinia-orm): small improvement

* feat(pinia-orm): add `hasManyThrough` relation (#678)

* feat(pinia-orm): add `hasManyThrough` relation

* test(pinia-orm): add make test

* test(pinia-orm): remove console log

* docs(pinia-orm): small typo

* docs(pinia-orm): update readme

* docs(pinia-orm): update readme

* fix(pinia-orm): updates where ignored in hydration

* refactor(pinia-orm): typo has many through

* refactor(pinia-orm): improve relation code

* fix(pinia-orm): update hook not triggered with `update` method

* refactor(pinia-orm): Improve hydrating saving

* refactor(pinia-orm): Improve typescript handling with `piniaStore()`

* fix(pinia-orm): @onDelete on same model attrs leads to undefined error (#754)

* fix(pinia-orm): @onDelete and Attr(object) leads to undefined error
closes #748

* refactor(pinia-orm): linting

* refactor(pinia-orm): remove console.log

* feat(pinia-orm): Add the possibility to rollback changed models.
closes #756

* docs(pinia-orm): Add documentation

* perf(pinia-orm): Remove `JSON.stringfy` for comparing objects

* docs(pinia-orm): Add some missing model functions to api

* fix(pinia-orm): Don't delete relations bind with `onDelete` if hook returns false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant