Show
Ignore:
Timestamp:
07/24/08 03:32:03 (6 months ago)
Author:
guilhermeblanco
Message:

Added coverage to ticket #1219. This ticket works for me. Small changes in import.

Files:
1 modified

Legend:

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

    r4677 r4709  
    239239            } 
    240240 
    241             $templates = array_keys(Doctrine::getTable($className)->getTemplates()); 
    242  
    243             if (in_array('Doctrine_Template_NestedSet', $templates)) { 
     241            if (Doctrine::getTable($className)->isTree()) { 
    244242                $nestedSets[$className][] = $data; 
    245243                $this->_buildNestedSetRows($className, $data); 
     
    276274                    $templates = array_keys($obj->getTable()->getTemplates()); 
    277275                     
    278                     if ($obj instanceof $model && ! in_array('Doctrine_Template_NestedSet', $templates)) { 
     276                    if ($obj instanceof $model && ! $obj->getTable()->isTree()) { 
    279277                        $obj->save(); 
    280278                    }