1
0
mirror of synced 2025-01-18 14:31:40 +03:00
This commit is contained in:
doctrine 2006-05-25 11:06:58 +00:00
parent 81a84bc897
commit a0d114134e
2 changed files with 22 additions and 1 deletions

View File

@ -421,6 +421,23 @@ class Doctrine_Query extends Doctrine_Access {
if(empty($row))
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();
if( ! isset($previd[$name]))

View File

@ -134,10 +134,11 @@ class Doctrine_SessionTestCase extends Doctrine_UnitTestCase {
$this->assertTrue(is_numeric($user->Phonenumber[0]->entity_id));
$this->assertEqual(count($user->Group), 2);
$user2 = $user;
$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->email_id));
@ -146,6 +147,8 @@ class Doctrine_SessionTestCase extends Doctrine_UnitTestCase {
$this->assertTrue($user->Phonenumber->count(), 4);
$this->assertEqual($user->Group->count(), 2);
$this->assertTrue($this->dbh instanceof Doctrine_DB);
$user = $this->objTable->find(5);
$pf = $this->session->getTable("Phonenumber");
@ -353,5 +356,6 @@ class Doctrine_SessionTestCase extends Doctrine_UnitTestCase {
$this->session->clear();
$this->assertEqual($this->session->getTables(), array());
}
}
?>