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

Typo in doc (used ArrayCollection instead of Collection) #62

Open
nikolay-nikitin opened this issue Jul 12, 2017 · 0 comments
Open

Typo in doc (used ArrayCollection instead of Collection) #62

nikolay-nikitin opened this issue Jul 12, 2017 · 0 comments

Comments

@nikolay-nikitin
Copy link

nikolay-nikitin commented Jul 12, 2017

Hi.

It seems like there is a mistake in mapping documentation ("Multiple object" section). We shouldn't use use Doctrine\Common\Collections\ArrayCollection. Probably it was meant ONGR\ElasticsearchBundle\Collection\Collection.

Using of ArrayCollection leads to error in /vendor/ongr/elasticsearch-bundle/Result/Converter.php:

private function isCollection($property, $value)
    {
        if (!$value instanceof Collection) {
            $got = is_object($value) ? get_class($value) : gettype($value);

            throw new \InvalidArgumentException(
                sprintf('Value of "%s" property must be an instance of Collection, got %s.', $property, $got)
            );
        }
    }
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

No branches or pull requests

1 participant