Using PersisterHelper
instead of the unreliable ClassMetadataInfo#getTypeOfColumn()
This commit is contained in:
parent
f1170c84a4
commit
f13b085582
@ -26,6 +26,7 @@ use Doctrine\DBAL\LockMode;
|
||||
use Doctrine\DBAL\Types\Type;
|
||||
|
||||
use Doctrine\Common\Collections\Criteria;
|
||||
use Doctrine\ORM\Utility\PersisterHelper;
|
||||
|
||||
/**
|
||||
* The joined subclass persister maps a single entity instance to several tables in the
|
||||
@ -463,7 +464,11 @@ class JoinedSubclassPersister extends AbstractEntityInheritancePersister
|
||||
$tableAlias,
|
||||
$srcColumn,
|
||||
$className,
|
||||
$targetClass->getTypeOfColumn($mapping['sourceToTargetKeyColumns'][$srcColumn])
|
||||
PersisterHelper::getTypeOfColumn(
|
||||
$mapping['sourceToTargetKeyColumns'][$srcColumn],
|
||||
$targetClass,
|
||||
$this->em
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -508,7 +513,11 @@ class JoinedSubclassPersister extends AbstractEntityInheritancePersister
|
||||
$tableAlias,
|
||||
$srcColumn,
|
||||
$className,
|
||||
$targetClass->getTypeOfColumn($mapping['sourceToTargetKeyColumns'][$srcColumn])
|
||||
PersisterHelper::getTypeOfColumn(
|
||||
$mapping['sourceToTargetKeyColumns'][$srcColumn],
|
||||
$targetClass,
|
||||
$this->em
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ namespace Doctrine\ORM\Persisters\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping\ClassMetadata;
|
||||
use Doctrine\Common\Collections\Criteria;
|
||||
use Doctrine\ORM\Utility\PersisterHelper;
|
||||
|
||||
/**
|
||||
* Persister for entities that participate in a hierarchy mapped with the
|
||||
@ -95,7 +96,11 @@ class SingleTablePersister extends AbstractEntityInheritancePersister
|
||||
$tableAlias,
|
||||
$srcColumn,
|
||||
$className,
|
||||
$targetClass->getTypeOfColumn($mapping['sourceToTargetKeyColumns'][$srcColumn])
|
||||
PersisterHelper::getTypeOfColumn(
|
||||
$mapping['sourceToTargetKeyColumns'][$srcColumn],
|
||||
$targetClass,
|
||||
$this->em
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user