1
0
mirror of synced 2025-03-09 22:36:14 +03:00

some consistency fixes

This commit is contained in:
Johannes M. Schmitt 2013-11-01 22:37:59 +01:00
parent f86abd81dd
commit 97836ef8c6
4 changed files with 5 additions and 5 deletions

View File

@ -3094,7 +3094,7 @@ class ClassMetadataInfo implements ClassMetadata
$fieldMapping['declaredField'] = $property;
$fieldMapping['originalField'] = $fieldMapping['fieldName'];
$fieldMapping['fieldName'] = $property . "." . $fieldMapping['fieldName'];
$fieldMapping['columnName'] = $this->namingStrategy->embeddedFieldToColumnName($property, $fieldMapping['columnName']);
$fieldMapping['columnName'] = $this->namingStrategy->embeddedFieldToColumnName($property, $fieldMapping['columnName'], $this->reflClass->name, $embeddable->reflClass->name);
$this->mapField($fieldMapping);
}

View File

@ -53,9 +53,9 @@ class DefaultNamingStrategy implements NamingStrategy
/**
* {@inheritdoc}
*/
public function embeddedFieldToColumnName($propertyName, $embeddedColumnName)
public function embeddedFieldToColumnName($propertyName, $embeddedColumnName, $className = null, $embeddedClassName = null)
{
return $propertyName.ucfirst($embeddedColumnName);
return $propertyName.'_'.$embeddedColumnName;
}
/**

View File

@ -57,7 +57,7 @@ interface NamingStrategy
*
* @return string
*/
function embeddedFieldToColumnName($propertyName, $embeddedColumnName);
function embeddedFieldToColumnName($propertyName, $embeddedColumnName, $className = null, $embeddedClassName = null);
/**
* Returns the default reference column name.

View File

@ -90,7 +90,7 @@ class UnderscoreNamingStrategy implements NamingStrategy
/**
* {@inheritdoc}
*/
public function embeddedFieldToColumnName($propertyName, $embeddedColumnName)
public function embeddedFieldToColumnName($propertyName, $embeddedColumnName, $className = null, $embeddedClassName = null)
{
return $this->underscore($propertyName).'_'.$embeddedColumnName;
}