Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

A error occurs: No method "getName()" found in class "Doctrine\ORM\PersistentCollection" #201

Open
divined opened this issue Aug 2, 2019 · 1 comment

Comments

@divined
Copy link

divined commented Aug 2, 2019

/**
* @solr\Field(type="strings", getter="getName")
*
* @Orm\ManyToMany(targetEntity="App\Entity\Vocabulary\Classificator")
* @Orm\JoinTable(name="object_classificator_district",
* joinColumns={@Orm\JoinColumn(name="object_id", referencedColumnName="id")},
* inverseJoinColumns={@Orm\JoinColumn(name="classificator_id", referencedColumnName="id")}
* )
*/
private $districts;

And I get the following error during population:
A error occurs: No method "getName()" found in class "Doctrine\ORM\PersistentCollection"

How to index ManyToMany in Symfony 4?

@jadelrab
Copy link

I've just made a pull request #202 to fix a similar issue with one to many .. you can check if it works with your issue too ?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants