Changeset 5305

Show
Ignore:
Timestamp:
12/17/08 23:23:14 (7 months ago)
Author:
jwage
Message:

[1.0, 1.1] Fixes issue with data fixtures exporting with foreign keys (closes #1665)

Location:
branches
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/1.0/lib/Doctrine/Data/Export.php

    r5186 r5305  
    174174 
    175175                    if ($relation = $this->isRelation($record, $key)) { 
     176                        if ( ! $value) { 
     177                            continue; 
     178                        } 
    176179                        $relationAlias = $relation['alias']; 
    177180                        $relationRecord = $record->$relationAlias; 
     
    183186 
    184187                        // If relation is null or does not exist then continue 
    185                         if ($relationRecord instanceof Doctrine_Null || !$relationRecord) { 
     188                        if ($relationRecord instanceof Doctrine_Null || ! $relationRecord) { 
    186189                            continue; 
    187190                        } 
  • branches/1.1/lib/Doctrine/Data/Export.php

    r5186 r5305  
    174174 
    175175                    if ($relation = $this->isRelation($record, $key)) { 
     176                        if ( ! $value) { 
     177                            continue; 
     178                        } 
    176179                        $relationAlias = $relation['alias']; 
    177180                        $relationRecord = $record->$relationAlias; 
     
    183186 
    184187                        // If relation is null or does not exist then continue 
    185                         if ($relationRecord instanceof Doctrine_Null || !$relationRecord) { 
     188                        if ($relationRecord instanceof Doctrine_Null || ! $relationRecord) { 
    186189                            continue; 
    187190                        }