1
0
mirror of synced 2025-02-20 22:23:14 +03:00

Using PersisterHelper instead of the unreliable ClassMetadataInfo#getTypeOfColumn()

This commit is contained in:
Marco Pivetta 2015-01-17 08:14:04 +01:00
parent f1170c84a4
commit f13b085582
2 changed files with 17 additions and 3 deletions

View File

@ -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
)
);
}
}

View File

@ -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
)
);
}
}