Changeset 6889

Show
Ignore:
Timestamp:
12/07/09 15:28:21 (8 months ago)
Author:
jwage
Message:

[1.2][DC-317] Fixing issue with nested set createRoot() method and string root column

Location:
branches/1.2
Files:
1 added
1 modified

Legend:

Unmodified
Added
Removed
  • branches/1.2/lib/Doctrine/Tree/NestedSet.php

    r6799 r6889  
    8888    { 
    8989        if ($this->getAttribute('hasManyRoots')) { 
    90             if ( ! $record || ( ! $record->exists() && $record->getNode()->getRootValue() <= 0) 
     90            if ( ! $record || ( ! $record->exists() && ! $record->getNode()->getRootValue()) 
    9191                    || $record->getTable()->isIdentifierComposite()) { 
    9292                throw new Doctrine_Tree_Exception("Node must have a root id set or must " 
     
    9696            } 
    9797             
    98             if ($record->exists() && $record->getNode()->getRootValue() <= 0) { 
     98            if ($record->exists() && ! $record->getNode()->getRootValue()) { 
    9999                // Default: root_id = id 
    100100                $identifier = $record->getTable()->getIdentifier();