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 ...@@ -105,6 +105,16 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator
{ {
return $this->_table; 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 * this method is automatically called when this Doctrine_Collection is serialized
* *
......
...@@ -696,7 +696,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun ...@@ -696,7 +696,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun
} catch(Doctrine_Adapter_Exception $e) { } catch(Doctrine_Adapter_Exception $e) {
} catch(PDOException $e) { } } catch(PDOException $e) { }
print Doctrine_Lib::formatSql($query);
$this->rethrowException($e); $this->rethrowException($e);
} }
/** /**
......
...@@ -825,7 +825,10 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite ...@@ -825,7 +825,10 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
if ( ! ($value instanceof Doctrine_Collection)) { 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."); 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 { } else {
// one-to-one relation found // one-to-one relation found
if ( ! ($value instanceof Doctrine_Record)) { 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