Skip to content

Conversation

jmikola
Copy link
Member

@jmikola jmikola commented Jun 19, 2024

https://jira.mongodb.org/browse/PHPORM-175

Incorporates the proposed solution in #2783 to not default $ownerKey to the current model's key name when constructing a MorphTo in HybridRelations::morphTo().

That change alone caused RelationsTest::testMorph() to fail, since MorphTo::addConstraints() would attempt to use a null ownerKey value. This required an additional change to fall back to the foreign key name when building the constraint.

Checklist

  • Add tests and ensure they pass
  • Add an entry to the CHANGELOG.md file
  • Update documentation for new features

Incorporates the proposed solution in mongodb#2783 to not default $ownerKey to the current model's key name when constructing a MorphTo in HybridRelations::morphTo().

That change alone caused RelationsTest::testMorph() to fail, since MorphTo::addConstraints() would attempt to use a null ownerKey value. This required an additional change to fall back to the foreign key name when building the constraint.
@jmikola jmikola requested a review from a team as a code owner June 19, 2024 03:16
@jmikola jmikola requested review from alcaeus and GromNaN June 19, 2024 03:16
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.

2 participants