Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix belongs to relation when parent is changed using parent id #432

Merged
merged 2 commits into from
Jul 31, 2023

Conversation

roxblnfk
Copy link
Member

What was changed

Fix #346

Fixed expected behavior:
If we change parent ID in a BelongsTo relation and store the child entity, the parent entity will be changed in the relation with the new one.

Before it was like this: the nullable BelongsTo relation can't be finished if the parent had loaded state.

@codecov
Copy link

codecov bot commented Jul 31, 2023

Codecov Report

Merging #432 (5e4f700) into 2.x (b899e88) will increase coverage by 0.06%.
The diff coverage is 84.84%.

@@             Coverage Diff              @@
##                2.x     #432      +/-   ##
============================================
+ Coverage     91.52%   91.58%   +0.06%     
- Complexity     1760     1765       +5     
============================================
  Files           112      112              
  Lines          4482     4504      +22     
============================================
+ Hits           4102     4125      +23     
+ Misses          380      379       -1     
Files Changed Coverage Δ
src/Mapper/Proxy/ProxyEntityFactory.php 93.33% <66.66%> (-1.19%) ⬇️
src/Relation/BelongsTo.php 94.57% <78.57%> (+3.89%) ⬆️
src/Mapper/Proxy/EntityProxyTrait.php 85.71% <90.00%> (+1.33%) ⬆️
src/Heap/Node.php 98.73% <100.00%> (-0.05%) ⬇️
src/Mapper/Proxy/Hydrator/ClosureHydrator.php 90.62% <100.00%> (+0.30%) ⬆️

... and 1 file with indirect coverage changes

@roxblnfk roxblnfk merged commit 04693aa into 2.x Jul 31, 2023
28 of 29 checks passed
@roxblnfk roxblnfk deleted the case-346 branch July 31, 2023 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 Transaction can't be finished. Some relations can't be resolved. Delete User.
1 participant