1
0
mirror of synced 2025-02-20 14:13:15 +03:00
This commit is contained in:
zYne 2007-05-29 18:55:46 +00:00
parent 95f539567d
commit cc01ca4686

View File

@ -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);