This commit is contained in:
parent
54fcf19fdc
commit
bf263fe1b3
1 changed files with 3 additions and 1 deletions
|
@ -48,7 +48,9 @@ class Doctrine_Relation_LocalKey extends Doctrine_Relation
|
|||
if (empty($id)) {
|
||||
$related = $this->getTable()->create();
|
||||
} else {
|
||||
if ( ! ($related = $this->getTable()->find($id))) {
|
||||
$related = $this->getTable()->find($id);
|
||||
|
||||
if ( ! $related) {
|
||||
$related = $this->getTable()->create();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue