Support doctrine Collection (#1369)

This commit is contained in:
Guilhem N 2018-07-27 08:30:22 +02:00 committed by GitHub
parent 09e6f30572
commit 619ae0d5ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,7 +86,7 @@ class ObjectModelDescriber implements ModelDescriberInterface, ModelRegistryAwar
}
$type = $types[0];
if (Type::BUILTIN_TYPE_ARRAY === $type->getBuiltinType()) {
if ($type->isCollection()) {
$type = $type->getCollectionValueType();
if (null === $type) {
throw new \LogicException(sprintf('Property "%s:%s" is an array, but no indication of the array elements are made. Use e.g. string[] for an array of string.', $class, $propertyName));