1
0
mirror of synced 2025-02-20 06:03:15 +03:00

Made DDC-1209 test pass

This commit is contained in:
Michael Ridgway 2011-06-16 08:55:09 -04:00
parent da2d83fc7d
commit d1106a730b
2 changed files with 6 additions and 6 deletions

View File

@ -49,7 +49,7 @@ class AssignedGenerator extends AbstractIdGenerator
foreach ($idFields as $idField) {
$value = $class->reflFields[$idField]->getValue($entity);
if (isset($value)) {
if (is_object($value)) {
if (isset($class->associationMappings[$idField])) {
if (!$em->getUnitOfWork()->isInIdentityMap($value)) {
throw ORMException::entityMissingForeignAssignedId($entity, $value);
}
@ -67,7 +67,7 @@ class AssignedGenerator extends AbstractIdGenerator
$idField = $class->identifier[0];
$value = $class->reflFields[$idField]->getValue($entity);
if (isset($value)) {
if (is_object($value)) {
if (isset($class->associationMappings[$idField])) {
if (!$em->getUnitOfWork()->isInIdentityMap($value)) {
throw ORMException::entityMissingForeignAssignedId($entity, $value);
}

View File

@ -93,9 +93,9 @@ class DDC1209_2
public function __construct(DDC1209_1 $future1)
{
$this->future1 = $future1;
$this->starting_datetime = new \DateTime();
$this->during_datetime = new \DateTime();
$this->ending_datetime = new \DateTime();
$this->starting_datetime = new DateTime2();
$this->during_datetime = new DateTime2();
$this->ending_datetime = new DateTime2();
}
}
@ -120,6 +120,6 @@ class DateTime2 extends \DateTime
{
public function __toString()
{
return $this->form('Y');
return $this->format('Y');
}
}