Commit cc01ca46 authored by zYne's avatar zYne

--no commit message

--no commit message
parent 95f53956
......@@ -51,7 +51,7 @@ class Doctrine_Relation_ForeignKey extends Doctrine_Relation
}
}
if ($this->isOneToOne()) {
if (empty($id)) {
if ( ! $record->exists() || empty($id)) {
$related = $this->getTable()->create();
} else {
$dql = 'FROM ' . $this->getTable()->getComponentName()
......@@ -65,7 +65,7 @@ class Doctrine_Relation_ForeignKey extends Doctrine_Relation
} else {
if (empty($id)) {
if ( ! $record->exists() || empty($id)) {
$related = new Doctrine_Collection($this->getTable());
} else {
$query = $this->getRelationDql(1);
......
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