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

[Tree] Fix TreeObjectHydrator, when $parent field is defined before $children field #2866

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mic-tilted
Copy link

I followed the documentation https://github.com/doctrine-extensions/DoctrineExtensions/blob/main/doc/tree.md#building-trees-from-your-entities

And I'm encountering this error:

In AssociationMapping.php line 256:

  Unknown property "mappedBy" on class Doctrine\ORM\Mapping\ManyToOneAssociationMapping

The error occurs when the $parent field is defined before $children in a Tree entity. I forked the repository and ran the tests, reversing the order of the fields in tests/Gedmo/Tree/Fixture/RootCategory.php, and I managed to reproduce the same error.

…s defined before the child field in a tree structure.
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