Feature request: setRelated modifies associated id column
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 7.3k
- Forks
- 637
- PR merge metrics
- No merged PRs in 30d
Description
Currently, $setRelated will place the given object on a model, equivalent to post.author = user. It would be nice if $setRelated would set the appropriate xId column as well (if defined in the relationMappings), equivalent to post.author = user; post.authorId = user.id.
Contributor guide
No contributing guide indexed for this repository
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 by locating the $setRelated entry point and the relationMappings handling for associated id columns. Trace how assigning the related object currently works, then verify that a defined xId column is updated consistently with the related object's id and add or run tests covering this behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100