Merge branch 'hotfix/#1327-entity-generator-default-property-value-export'
Close #1327
This commit is contained in:
commit
8f0b3398d3
@ -1312,7 +1312,7 @@ public function __construct(<params>)
|
||||
|
||||
$lines[] = $this->generateFieldMappingPropertyDocBlock($fieldMapping, $metadata);
|
||||
$lines[] = $this->spaces . $this->fieldVisibility . ' $' . $fieldMapping['fieldName']
|
||||
. (isset($fieldMapping['default']) ? ' = ' . var_export($fieldMapping['default'], true) : null) . ";\n";
|
||||
. (isset($fieldMapping['options']['default']) ? ' = ' . var_export($fieldMapping['options']['default'], true) : null) . ";\n";
|
||||
}
|
||||
|
||||
return implode("\n", $lines);
|
||||
|
@ -64,7 +64,7 @@ class EntityGeneratorTest extends OrmTestCase
|
||||
$metadata->table['uniqueConstraints']['name_uniq'] = array('columns' => array('name'));
|
||||
$metadata->table['indexes']['status_idx'] = array('columns' => array('status'));
|
||||
$metadata->mapField(array('fieldName' => 'name', 'type' => 'string'));
|
||||
$metadata->mapField(array('fieldName' => 'status', 'type' => 'string', 'default' => 'published'));
|
||||
$metadata->mapField(array('fieldName' => 'status', 'type' => 'string', 'options' => array('default' => 'published')));
|
||||
$metadata->mapField(array('fieldName' => 'id', 'type' => 'integer', 'id' => true));
|
||||
$metadata->mapOneToOne(array('fieldName' => 'author', 'targetEntity' => 'Doctrine\Tests\ORM\Tools\EntityGeneratorAuthor', 'mappedBy' => 'book'));
|
||||
$joinColumns = array(
|
||||
|
Loading…
Reference in New Issue
Block a user