Commit 2e1b1619 authored by Guillaume Perréal's avatar Guillaume Perréal

Corrige l'affichage des identifiants.

parent 23467d72
......@@ -25,7 +25,8 @@ class FieldDecorator extends AbstractDoctrineDecorator
protected function extractItems(ReflectionClass $class)
{
return $this->withMetadata(
function ($metadata) {
function (ClassMetadata $metadata) {
/* @var $metadata \Doctrine\ORM\Mapping\ClassMetadata */
return $metadata->fieldMappings;
},
$class
......@@ -35,17 +36,18 @@ class FieldDecorator extends AbstractDoctrineDecorator
protected function decorateItem(ReflectionClass $class, NodeInterface $node, ClassVisitorInterface $visitor, $field)
{
$isIdentifier = $this->withMetadata(
function ($metadata) use ($field) {
function (ClassMetadata $metadata) use ($field) {
/* @var $metadata \Doctrine\ORM\Mapping\ClassMetadata */
return $metadata->isIdentifier($field['fieldName']);
},
$class
);
$node->addAttribute(new Field(
$field['fieldName'],
$field['type'],
$field['unique'],
$field['nullable']
$field['nullable'],
$isIdentifier
));
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment