Made DDC-1209 test pass
This commit is contained in:
parent
da2d83fc7d
commit
d1106a730b
@ -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);
|
||||
}
|
||||
|
@ -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');
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user