loopbackio / loopbackio/loopback-datasource-juggler
Use operation hooks instead of deprecated model hooks
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 282
- Forks
- 366
- Avg merge
- 17h 4m
- Merged PRs (30d)
- 10
Description
See the discussion in #824. We were not able to remove deprecated model hooks because embedded relations are still relying on them.
There is a feature for
inst.triggerParentin embedsMany that needs more consideration and possibly a rewrite for embedded relations to continue work. It is for updating the parent model if any changes are made to the relation. This part needs a redesign and rewrite to consider the different cases and to make it all consistent.
We should rewrite inst.triggerParent to not depend on deprecated hooks, for example using the approach outlined in https://github.com/strongloop/loopback-datasource-juggler/commit/d0cc791bc65e5ee7d2447698539da1d1ca0591ee
cc @jannyHou @Amir-61 @superkhau
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the discussion in #824 and inspect the embedded-relation path around inst.triggerParent. Compare its current behavior with the approach in commit d0cc791bc65e5ee7d2447698539da1d1ca0591ee. Done means embedded relations still update their parent consistently without relying on deprecated model hooks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- database
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100