- Timestamp:
- 01/25/10 14:29:10 (2 months ago)
- Files:
-
- fORMRelated.php (modified) (3 diffs)
- fRecordSet.php (modified) (2 diffs)
- fSchema.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
fORMRelated.php
r741 r745 Hide Line Numbers 13 13 * @link http://flourishlib.com/fORMRelated 14 14 * 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] 16 17 * @changes 1.0.0b22 Fixed a bug with associating a non-contiguous array of fActiveRecord objects [wb, 2009-12-17] 17 18 * @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] … … 575 576 $new_related_pk_columns = array(); 576 577 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); 578 580 } 579 581 $related_pk_columns = $new_related_pk_columns; … … 590 592 $params = array( 591 593 $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 = ", 594 598 $table_with_route . '.' . $column 595 599 ), fRecordSet.php
r734 r745 Hide Line Numbers 10 10 * @link http://flourishlib.com/fRecordSet 11 11 * 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] 13 14 * @changes 1.0.0b31 Added the ability to compare columns in ::build() with the `=:`, `!:`, `<:`, `<=:`, `>:` and `>=:` operators [wb, 2009-12-08] 14 15 * @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] … … 1314 1315 // If we are going through a join table we need the related primary key for matching 1315 1316 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']); 1317 1319 } 1318 1320 fSchema.php
r735 r745 Hide Line Numbers 10 10 * @link http://flourishlib.com/fSchema 11 11 * 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] 13 14 * @changes 1.0.0b29 Added on_delete and on_update elements to one-to-one relationship info retrieved by ::getRelationships() [wb, 2009-12-16] 14 15 * @changes 1.0.0b28 Fixed a bug with detecting some multi-column unique constraints in SQL Server databases [wb, 2009-11-13] … … 773 774 $data_type_mapping = array( 774 775 'boolean' => 'boolean', 776 'number' => 'integer', 775 777 'integer' => 'integer', 776 778 'timestamp' => 'timestamp', … … 2022 2024 ALL_TABLES 2023 2025 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 2030 2052 DROPPED = 'NO' 2031 2053 ORDER BY
