1
0
mirror of synced 2025-02-10 01:09:26 +03:00

Corrected demo code to match example

Example paragraph mentions changing column titles to upper case, yet `strtolower` was being used.
This commit is contained in:
Dan Barrett 2017-11-01 16:40:04 +11:00 committed by GitHub
parent a82f6c5725
commit bccc46dc12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -126,12 +126,12 @@ You need to create a class which implements ``Doctrine\ORM\Mapping\NamingStrateg
} }
public function joinTableName($sourceEntity, $targetEntity, $propertyName = null) public function joinTableName($sourceEntity, $targetEntity, $propertyName = null)
{ {
return strtolower($this->classToTableName($sourceEntity) . '_' . return strtoupper($this->classToTableName($sourceEntity) . '_' .
$this->classToTableName($targetEntity)); $this->classToTableName($targetEntity));
} }
public function joinKeyColumnName($entityName, $referencedColumnName = null) public function joinKeyColumnName($entityName, $referencedColumnName = null)
{ {
return strtolower($this->classToTableName($entityName) . '_' . return strtoupper($this->classToTableName($entityName) . '_' .
($referencedColumnName ?: $this->referenceColumnName())); ($referencedColumnName ?: $this->referenceColumnName()));
} }
} }