private function generateDocumentConstructor(array $metadata)
    {
        $fields = [];

        foreach ($metadata['properties'] as $prop) {
            if ($prop['annotation'] == 'embedded' && isset($prop['property_multiple']) && $prop['property_multiple']) {
                $fields[] = sprintf('%s$this->%s = new Collection();', $this->spaces, $prop['field_name']);
            }
        }

        return $this->prefixWithSpaces(
            str_replace('<fields>', implode("\n", $fields), $this->constructorTemplate)
        ) . "\n";
    }