1
0
mirror of synced 2025-01-18 22:41:43 +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']
: null;
$preventPrefixing = (
$columnPrefix === '0' || $columnPrefix === 'false'
);
$useColumnPrefix = isset($embeddedMapping['use-column-prefix'])
? $this->evaluateBoolean(
$embeddedMapping['use-column-prefix']
)
: true;
$mapping = array(
'fieldName' => (string) $embeddedMapping['name'],
'class' => (string) $embeddedMapping['class'],
'columnPrefix' => $preventPrefixing ? false : $columnPrefix
'columnPrefix' => !$useColumnPrefix ? false : $columnPrefix
);
$metadata->mapEmbedded($mapping);