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: morphTo() not extracting JSON attribute values #52

Merged
merged 1 commit into from Apr 17, 2021

Conversation

iksaku
Copy link
Contributor

@iksaku iksaku commented Apr 13, 2021

In a recent PR to the framework an edge-case as fixed. It prevented morphTo relationships to be properly handled if attribute names for type and id where also registered for casting.

Now, instead of trying to access the attribute values via attribute casting, they're accessed directly from the $attributes array (via getAttributeFromArray()).

This PR aims to fix a bug caused by the change of attribute value access.

@staudenmeir
Copy link
Owner

Thanks, I'll take a look.

@staudenmeir staudenmeir merged commit 7b0a8bb into staudenmeir:master Apr 17, 2021
@iksaku iksaku deleted the fix/morph-to-type-key branch April 17, 2021 21:46
vinkev pushed a commit to vinkev/eloquent-json-relations that referenced this pull request Feb 16, 2022
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.

None yet

2 participants