Changeset 5286

Show
Ignore:
Timestamp:
12/11/08 09:56:16 (7 months ago)
Author:
adrive
Message:

[1.1] Property max_identifier_length is now used as the length parameter for _generateUniqueName method. Oracle holds only 30 characters long identifiers.

Location:
branches/1.1/lib/Doctrine
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/1.1/lib/Doctrine/Connection.php

    r5268 r5286  
    154154                                  'varchar_max_length'  => 255, 
    155155                                  'sql_file_delimiter'  => ";\n", 
     156                                  'max_identifier_length' => 64, 
    156157                                  ); 
    157158 
     
    16061607        $format = $this->getAttribute(Doctrine::ATTR_FKNAME_FORMAT); 
    16071608 
    1608         return $this->_generateUniqueName('foreign_keys', $parts, $key, $format, 64); 
     1609        return $this->_generateUniqueName('foreign_keys', $parts, $key, $format, $this->properties['max_identifier_length']); 
    16091610    } 
    16101611 
     
    16241625        $format = $this->getAttribute(Doctrine::ATTR_IDXNAME_FORMAT); 
    16251626 
    1626         return $this->_generateUniqueName('indexes', $parts, $key, $format, 64); 
     1627        return $this->_generateUniqueName('indexes', $parts, $key, $format, $this->properties['max_identifier_length']); 
    16271628    } 
    16281629 
  • branches/1.1/lib/Doctrine/Connection/Oracle.php

    r5117 r5286  
    6464        $this->properties['varchar2_max_length']  = 4000; 
    6565        $this->properties['number_max_precision'] = 38; 
     66        $this->properties['max_identifier_length'] = 30; 
    6667         
    6768        parent::__construct($manager, $adapter);