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: detect if relation is oneToOne #732

Merged
merged 1 commit into from
Dec 10, 2024
Merged

Conversation

nikophil
Copy link
Member

@nikophil nikophil commented Dec 6, 2024

This PR fixes a last bug before we can release 2.3: some edge case was buggy, when the a many to one was referencing a "self referencing" class

@nikophil nikophil marked this pull request as ready for review December 6, 2024 15:10
@nikophil nikophil requested a review from kbond December 6, 2024 15:10
@@ -29,17 +29,18 @@ public function relationshipMetadata(string $parent, string $child, string $fiel
{
$metadata = $this->classMetadata($parent);

$association = $this->getAssociationMapping($parent, $field);
$association = $this->getAssociationMapping($parent, $child, $field);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that at some point I'll refacto this method which is becoming ugly

@nikophil nikophil merged commit af64c35 into zenstruck:2.x Dec 10, 2024
38 checks passed
@nikophil nikophil deleted the fix/one-to-one branch December 10, 2024 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants