Respecting use-column-prefix
instead of relying on false/0 of column-prefix
This commit is contained in:
parent
c964dd0cd2
commit
4935da138d
1 changed files with 6 additions and 4 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Reference in a new issue