root

Changeset 745

Show
Ignore:
Timestamp:
01/25/10 14:29:10 (2 months ago)
Author:
wbond
Message:

Fixed ticket #368 - added support for Oracle number columns.

Fixed some bugs related to testing and added SQL Server 2008 test configurations.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • fORMRelated.php

    r741 r745 Hide Line Numbers
    1313 * @link       http://flourishlib.com/fORMRelated 
    1414 *  
    15  * @version    1.0.0b22 
     15 * @version    1.0.0b23 
     16 * @changes    1.0.0b23  Fixed a column aliasing issue with SQLite [wb, 2010-01-25] 
    1617 * @changes    1.0.0b22  Fixed a bug with associating a non-contiguous array of fActiveRecord objects [wb, 2009-12-17] 
    1718 * @changes    1.0.0b21  Added support for the $force_cascade parameter of fActiveRecord::store(), added ::hasRecords() and fixed a bug with creating non-existent one-to-one related records [wb, 2009-12-16] 
     
    575576                $new_related_pk_columns = array(); 
    576577                foreach ($related_pk_columns as $related_pk_column) { 
    577                     $new_related_pk_columns[] = $related_table . '.' . $related_pk_column;   
     578                    // We explicitly alias the columns due to SQLite issues 
     579                    $new_related_pk_columns[] = $db->escape("%r AS %r", $related_table . '.' . $related_pk_column, $related_pk_column);  
    578580                } 
    579581                $related_pk_columns = $new_related_pk_columns; 
     
    590592                $params = array( 
    591593                    $db->escape( 
    592                         "SELECT %r FROM :from_clause WHERE %r = ", 
    593                         $related_pk_columns, 
     594                        sprintf( 
     595                            "SELECT %s FROM :from_clause WHERE", 
     596                            join(', ', $related_pk_columns) 
     597                        ) . " %r = ", 
    594598                        $table_with_route . '.' . $column 
    595599                    ), 
  • fRecordSet.php

    r734 r745 Hide Line Numbers
    1010 * @link       http://flourishlib.com/fRecordSet 
    1111 *  
    12  * @version    1.0.0b31 
     12 * @version    1.0.0b32 
     13 * @changes    1.0.0b32  Fixed a column aliasing issue with SQLite [wb, 2010-01-25] 
    1314 * @changes    1.0.0b31  Added the ability to compare columns in ::build() with the `=:`, `!:`, `<:`, `<=:`, `>:` and `>=:` operators [wb, 2009-12-08] 
    1415 * @changes    1.0.0b30  Fixed a bug affecting where conditions with columns that are not null but have a default value [wb, 2009-11-03] 
     
    13141315        // If we are going through a join table we need the related primary key for matching 
    13151316        if (isset($relationship['join_table'])) { 
    1316             $params[0] .= $db->escape(", %r", $table_with_route . '.' . $relationship['column']); 
     1317            // We explicitly alias the column because of SQLite issues 
     1318            $params[0] .= $db->escape(", %r AS %r", $table_with_route . '.' . $relationship['column'], $relationship['column']); 
    13171319        } 
    13181320         
  • fSchema.php

    r735 r745 Hide Line Numbers
    1010 * @link       http://flourishlib.com/fSchema 
    1111 *  
    12  * @version    1.0.0b29 
     12 * @version    1.0.0b30 
     13 * @changes    1.0.0b30  Fixed the class to work with lower privilege Oracle accounts and added detection of Oracle number columns [wb, 2010-01-25] 
    1314 * @changes    1.0.0b29  Added on_delete and on_update elements to one-to-one relationship info retrieved by ::getRelationships() [wb, 2009-12-16] 
    1415 * @changes    1.0.0b28  Fixed a bug with detecting some multi-column unique constraints in SQL Server databases [wb, 2009-11-13] 
     
    773774        $data_type_mapping = array( 
    774775            'boolean'           => 'boolean', 
     776            'number'            => 'integer', 
    775777            'integer'           => 'integer', 
    776778            'timestamp'         => 'timestamp', 
     
    20222024                                ALL_TABLES 
    20232025                            WHERE 
    2024                                 OWNER IN (SELECT 
    2025                                         username 
    2026                                     FROM 
    2027                                         dba_users 
    2028                                     WHERE 
    2029                                         default_tablespace NOT IN ('SYSTEM', 'SYSAUX')) AND 
     2026                                OWNER NOT IN ( 
     2027                                    'SYS', 
     2028                                    'SYSTEM', 
     2029                                    'OUTLN', 
     2030                                    'ANONYMOUS', 
     2031                                    'AURORA\$ORB\$UNAUTHENTICATED', 
     2032                                    'AWR_STAGE', 
     2033                                    'CSMIG', 
     2034                                    'CTXSYS', 
     2035                                    'DBSNMP', 
     2036                                    'DIP', 
     2037                                    'DMSYS', 
     2038                                    'DSSYS', 
     2039                                    'EXFSYS', 
     2040                                    'FLOWS_020100', 
     2041                                    'FLOWS_FILES', 
     2042                                    'LBACSYS', 
     2043                                    'MDSYS', 
     2044                                    'ORACLE_OCM', 
     2045                                    'ORDPLUGINS', 
     2046                                    'ORDSYS', 
     2047                                    'PERFSTAT', 
     2048                                    'TRACESVR', 
     2049                                    'TSMSYS', 
     2050                                    'XDB' 
     2051                                ) AND 
    20302052                                DROPPED = 'NO'  
    20312053                            ORDER BY