1
0
Fork 0
mirror of synced 2025-04-03 13:23:37 +03:00

Respecting use-column-prefix instead of relying on false/0 of column-prefix

This commit is contained in:
Andrey Knupp Vital 2015-01-08 00:10:24 -02:00
parent c964dd0cd2
commit 4935da138d

View file

@ -259,14 +259,16 @@ class XmlDriver extends FileDriver
? (string) $embeddedMapping['column-prefix'] ? (string) $embeddedMapping['column-prefix']
: null; : null;
$preventPrefixing = ( $useColumnPrefix = isset($embeddedMapping['use-column-prefix'])
$columnPrefix === '0' || $columnPrefix === 'false' ? $this->evaluateBoolean(
); $embeddedMapping['use-column-prefix']
)
: true;
$mapping = array( $mapping = array(
'fieldName' => (string) $embeddedMapping['name'], 'fieldName' => (string) $embeddedMapping['name'],
'class' => (string) $embeddedMapping['class'], 'class' => (string) $embeddedMapping['class'],
'columnPrefix' => $preventPrefixing ? false : $columnPrefix 'columnPrefix' => !$useColumnPrefix ? false : $columnPrefix
); );
$metadata->mapEmbedded($mapping); $metadata->mapEmbedded($mapping);