Closed faahren closed 7 years ago
Please find below my relation declaration in my Guide class:
/** * * @Solr\Field(type="string", getter="getName") * @ORM\ManyToOne(targetEntity="TT\GuidesBundle\Entity\Image", cascade="persist") */ private $image;
Cheers, G
You should remove the type-hint from setImage()
. Use hydration-mode DOCTRINE in your case.
Hi. I have an image pb. The indexation works fine and I see the image name in the Solr Admin panel, but when I query (simply) my collection, the hydratation of the image fails:
I even tried to create a special getter to get the object in my image class, but when I try to index it it says that a string is awaited.So, I have to index a string relation, I guess that's pretty logical.
I tried with either DOCTRINE or INDEX hydratation modes
Any idea why I get this problem ? Thanks a lot for your help Guillaume