yiisoft / yiisoft/active-record
BaseActiveRecord::bindModels() doing unnecessary save
Open
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 119
- Forks
- 38
- Avg merge
- 1h 11m
- Merged PRs (30d)
- 1
Description
What steps will reproduce the problem?
Link models
What is the expected result?
I expect the the function to link models without saving the foreign model.
Additional info
When calling the link() method that later calls the private bindModels() function, it saves the foreign model without validating it. In my case it is not a required effect, I would like to be able to save it manually.
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 by tracing the link() method into the private bindModels() function in the Active Record implementation. Check the existing model-linking behavior and confirm that linking does not save or validate the foreign model, while manual saving remains possible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100