1
0
mirror of synced 2025-01-06 00:57:10 +03:00
This commit is contained in:
Fabio B. Silva 2012-03-15 22:38:54 -03:00
parent 36dc560533
commit 9cee329407
5 changed files with 15 additions and 11 deletions

View File

@ -33,8 +33,10 @@ class HydrationException extends \Doctrine\ORM\ORMException
*/
public static function missingDiscriminatorColumn($entityName, $discrColumnName, $dqlAlias)
{
return new self("The discriminator column '$discrColumnName' "
. "is missing for '$entityName' using the DQL alias '$dqlAlias'.");
return new self(sprintf(
'The discriminator column "%s" is missing for "%s" using the DQL alias "%s".',
$discrColumnName, $entityName, $dqlAlias
));
}
/**
@ -46,7 +48,9 @@ class HydrationException extends \Doctrine\ORM\ORMException
*/
public static function missingDiscriminatorMetaMappingColumn($entityName, $discrColumnName, $dqlAlias)
{
return new self("The meta mapping for the discriminator column '$discrColumnName' "
. "is missing for '$entityName' using the DQL alias '$dqlAlias'.");
return new self(sprintf(
'The meta mapping for the discriminator column "%s" is missing for "%s" using the DQL alias "%s".',
$discrColumnName, $entityName, $dqlAlias
));
}
}

View File

@ -1869,7 +1869,7 @@ class ObjectHydratorTest extends HydrationTestCase
* @group DDC-1470
*
* @expectedException \Doctrine\ORM\Internal\Hydration\HydrationException
* @expectedExceptionMessage The meta mapping for the discriminator column 'c_discr' is missing for 'Doctrine\Tests\Models\Company\CompanyFixContract' using the DQL alias 'c'.
* @expectedExceptionMessage The meta mapping for the discriminator column "c_discr" is missing for "Doctrine\Tests\Models\Company\CompanyFixContract" using the DQL alias "c".
*/
public function testMissingMetaMappingException()
{
@ -1897,7 +1897,7 @@ class ObjectHydratorTest extends HydrationTestCase
* @group DDC-1470
*
* @expectedException \Doctrine\ORM\Internal\Hydration\HydrationException
* @expectedExceptionMessage The discriminator column 'discr' is missing for 'Doctrine\Tests\Models\Company\CompanyEmployee' using the DQL alias 'e'.
* @expectedExceptionMessage The discriminator column "discr" is missing for "Doctrine\Tests\Models\Company\CompanyEmployee" using the DQL alias "e".
*/
public function testMissingDiscriminatorColumnException()
{

View File

@ -13,7 +13,7 @@ class SimpleObjectHydratorTest extends HydrationTestCase
* @group DDC-1470
*
* @expectedException \Doctrine\ORM\Internal\Hydration\HydrationException
* @expectedExceptionMessage The discriminator column 'discr' is missing for 'Doctrine\Tests\Models\Company\CompanyPerson' using the DQL alias 'p'.
* @expectedExceptionMessage The discriminator column "discr" is missing for "Doctrine\Tests\Models\Company\CompanyPerson" using the DQL alias "p".
*/
public function testMissingDiscriminatorColumnException()
{