This commit is contained in:
parent
81a84bc897
commit
a0d114134e
@ -421,6 +421,23 @@ class Doctrine_Query extends Doctrine_Access {
|
|||||||
if(empty($row))
|
if(empty($row))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
$ids = $this->tables[$key]->getIdentifier();
|
||||||
|
|
||||||
|
if(is_array($ids)) {
|
||||||
|
$emptyID = false;
|
||||||
|
foreach($ids as $id) {
|
||||||
|
if($row[$id] == null) {
|
||||||
|
$emptyID = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($emptyID)
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
if($row[$ids] === null)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$name = $this->tables[$key]->getComponentName();
|
$name = $this->tables[$key]->getComponentName();
|
||||||
|
|
||||||
if( ! isset($previd[$name]))
|
if( ! isset($previd[$name]))
|
||||||
|
@ -134,10 +134,11 @@ class Doctrine_SessionTestCase extends Doctrine_UnitTestCase {
|
|||||||
$this->assertTrue(is_numeric($user->Phonenumber[0]->entity_id));
|
$this->assertTrue(is_numeric($user->Phonenumber[0]->entity_id));
|
||||||
|
|
||||||
$this->assertEqual(count($user->Group), 2);
|
$this->assertEqual(count($user->Group), 2);
|
||||||
|
$user2 = $user;
|
||||||
|
|
||||||
$user = $this->objTable->find($user->getID());
|
$user = $this->objTable->find($user->getID());
|
||||||
|
|
||||||
$this->assertEqual($user->getID(), $user->getID());
|
$this->assertEqual($user->getID(), $user2->getID());
|
||||||
|
|
||||||
$this->assertTrue(is_numeric($user->getID()));
|
$this->assertTrue(is_numeric($user->getID()));
|
||||||
$this->assertTrue(is_numeric($user->email_id));
|
$this->assertTrue(is_numeric($user->email_id));
|
||||||
@ -145,6 +146,8 @@ class Doctrine_SessionTestCase extends Doctrine_UnitTestCase {
|
|||||||
$this->assertTrue(is_numeric($user->Phonenumber[0]->entity_id));
|
$this->assertTrue(is_numeric($user->Phonenumber[0]->entity_id));
|
||||||
$this->assertTrue($user->Phonenumber->count(), 4);
|
$this->assertTrue($user->Phonenumber->count(), 4);
|
||||||
$this->assertEqual($user->Group->count(), 2);
|
$this->assertEqual($user->Group->count(), 2);
|
||||||
|
|
||||||
|
$this->assertTrue($this->dbh instanceof Doctrine_DB);
|
||||||
|
|
||||||
$user = $this->objTable->find(5);
|
$user = $this->objTable->find(5);
|
||||||
|
|
||||||
@ -353,5 +356,6 @@ class Doctrine_SessionTestCase extends Doctrine_UnitTestCase {
|
|||||||
$this->session->clear();
|
$this->session->clear();
|
||||||
$this->assertEqual($this->session->getTables(), array());
|
$this->assertEqual($this->session->getTables(), array());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user