This commit is contained in:
parent
81a84bc897
commit
a0d114134e
@ -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]))
|
||||
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user