Conversation
39833ab to
b2c8626
Compare
8dfa926 to
2363941
Compare
2363941 to
78debc5
Compare
Collaborator
|
I am looking into it but it will be a challenge. |
3426f9e to
4bfd093
Compare
Collaborator
|
I added a quickfix now. The issue will be resolved when #867 is closed |
Member
Author
|
@georgehristov thanks, I fixed the Field cloning issue #867 as well as your have proposed. |
mvorisek
commented
Apr 29, 2021
| public function getReference(): ?Reference | ||
| { | ||
| return $this->referenceLink !== null | ||
| ? $this->getOwner()->getRef($this->referenceLink) |
Member
Author
There was a problem hiding this comment.
I do not think we need to check if getOwner() is set, as Field with reference is created always with a model. If not, invoking getOwner will throw. :)
georgehristov
approved these changes
Apr 29, 2021
Collaborator
|
Now we need to modify |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #867 and https://github.com/atk4/data/blob/2.4.0/src/Model/Scope/Condition.php#L356 issue as well - Scope must not mutate Model in any sense, if something is desired to be set to gather data, it must be done on clone.
BC break:
Field::referenceproperty was removed, replaced byField::getReference()method.