Skip to content

Commit

Permalink
Update lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php
Browse files Browse the repository at this point in the history
Allow 'nullable' attribute to be exported for fields, something which already worked in YamlExport. This addition saved me a lot of time during development, not having to manually re-factor after each export.

Don't know why this was missing, maybe it's me who is missing something, so let me know ;)
  • Loading branch information
Cas authored and beberlei committed Sep 17, 2012
1 parent 4d9f24b commit 53e164b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ public function exportClassMetadata(ClassMetadataInfo $metadata)
if (isset($field['columnDefinition'])) {
$fieldXml->addAttribute('column-definition', $field['columnDefinition']);
}
if (isset($field['nullable'])) {
$fieldXml->addAttribute('nullable', $field['nullable'] ? 'true' : 'false');
}
}
}
$orderMap = array(
Expand Down

0 comments on commit 53e164b

Please sign in to comment.