yiisoft / yiisoft/active-record
Relationships cannot have the same name as properties
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 119
- Forks
- 38
- Avg merge
- 1h 11m
- Merged PRs (30d)
- 1
Description
Doesn't it look like a bug?
Either relationships cannot have the same name as properties, or unset() must remove both values.
Originally posted by @Tigrov in https://github.com/yiisoft/active-record/pull/545#discussion_r2992891609
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 lines R201-R213 in the PR #545 diff linked in the issue and inspect the handling of relationships, properties, and unset(). Reproduce the case where a relationship and property share a name, then determine the expected behavior: reject the duplicate name or remove both values with unset(); add coverage for the chosen behavior.
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
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100