Commit f6bb8c97 authored by zYne's avatar zYne

--no commit message

--no commit message
parent 99037abd
......@@ -105,6 +105,16 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator
{
return $this->_table;
}
/**
* setData
*
* @param array $data
* @return Doctrine_Collection
*/
public function setData(array $data)
{
$this->data = $data;
}
/**
* this method is automatically called when this Doctrine_Collection is serialized
*
......
......@@ -696,7 +696,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun
} catch(Doctrine_Adapter_Exception $e) {
} catch(PDOException $e) { }
print Doctrine_Lib::formatSql($query);
$this->rethrowException($e);
}
/**
......
......@@ -488,7 +488,7 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
foreach($array as $k => $v) {
$this->$k = $v;
}
$this->_table->getRepository()->add($this);
$this->_filter = new Doctrine_Record_Filter($this);
......@@ -825,7 +825,10 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
if ( ! ($value instanceof Doctrine_Collection)) {
throw new Doctrine_Record_Exception("Couldn't call Doctrine::set(), second argument should be an instance of Doctrine_Collection when setting one-to-many references.");
}
$value->setReference($this,$rel);
if (isset($this->_references[$name])) {
$this->_references[$name]->setData($value->getData());
return $this;
}
} else {
// one-to-one relation found
if ( ! ($value instanceof Doctrine_Record)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment