This commit is contained in:
parent
5607189453
commit
e89a841b00
@ -110,7 +110,6 @@ class Doctrine_Collection_Batch extends Doctrine_Collection {
|
||||
while($row = $stmt->fetch(PDO::FETCH_ASSOC)):
|
||||
|
||||
$this->table->setData($row);
|
||||
|
||||
if(is_object($this->data[$e])) {
|
||||
$this->data[$e]->factoryRefresh($this->table);
|
||||
} else {
|
||||
@ -159,7 +158,6 @@ class Doctrine_Collection_Batch extends Doctrine_Collection {
|
||||
|
||||
if( ! isset($this->data[$key]))
|
||||
$this->data[$key] = $this->table->create();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -386,28 +386,28 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
|
||||
|
||||
if( ! $this->loaded) {
|
||||
|
||||
// no use trying to load the data from database if the Doctrine_Record is new or clean
|
||||
if($this->state != Doctrine_Record::STATE_TDIRTY &&
|
||||
$this->state != Doctrine_Record::STATE_TCLEAN &&
|
||||
$this->state != Doctrine_Record::STATE_CLEAN) {
|
||||
|
||||
$this->loaded = true;
|
||||
|
||||
if( ! empty($this->collections)) {
|
||||
foreach($this->collections as $collection) {
|
||||
$collection->load($this);
|
||||
// no use trying to load the data from database if the Doctrine_Record is new or clean
|
||||
if($this->state != Doctrine_Record::STATE_TDIRTY &&
|
||||
$this->state != Doctrine_Record::STATE_TCLEAN &&
|
||||
$this->state != Doctrine_Record::STATE_CLEAN) {
|
||||
|
||||
$this->loaded = true;
|
||||
|
||||
if( ! empty($this->collections)) {
|
||||
foreach($this->collections as $collection) {
|
||||
$collection->load($this);
|
||||
}
|
||||
} else {
|
||||
|
||||
$this->refresh();
|
||||
}
|
||||
} else {
|
||||
|
||||
$this->refresh();
|
||||
$this->state = Doctrine_Record::STATE_CLEAN;
|
||||
}
|
||||
$this->state = Doctrine_Record::STATE_CLEAN;
|
||||
}
|
||||
|
||||
if(is_array($this->data[$name]))
|
||||
return null;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return $this->data[$name];
|
||||
}
|
||||
|
@ -32,13 +32,15 @@ $test->addTestCase(new Doctrine_ConfigurableTestCase());
|
||||
|
||||
|
||||
$test->addTestCase(new Doctrine_EventListenerTestCase());
|
||||
//$test->addTestCase(new Doctrine_BatchIteratorTestCase());
|
||||
$test->addTestCase(new Doctrine_DQL_ParserTestCase());
|
||||
|
||||
$test->addTestCase(new Doctrine_BatchIteratorTestCase());
|
||||
//$test->addTestCase(new Doctrine_Cache_FileTestCase());
|
||||
|
||||
|
||||
|
||||
|
||||
$test->addTestCase(new Doctrine_DQL_ParserTestCase());
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user