aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
Commit message (Collapse)AuthorAgeFilesLines
* Fix @logger.debug? conditional considering @logger may be nil.Jeremy Kemper2007-03-111-14/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6375 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Consistently quote primary key column names. Closes #7763.Jeremy Kemper2007-03-091-7/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6364 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixtures: fix YAML ordered map support. Closes #2665.Jeremy Kemper2007-03-091-6/+18
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6360 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* DateTimes assume the default timezone. Closes #7764.Jeremy Kemper2007-03-091-2/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6359 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix typo. References #7727, closes #7762.Jeremy Kemper2007-03-081-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6355 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Sybase: hide timestamp columns since they're inherently read-only. Closes #7716.Jeremy Kemper2007-03-061-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6349 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oracle: overflow Time to DateTime. Closes #7718.Jeremy Kemper2007-03-061-2/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6348 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Note that find results may not be in the same order as the id arguments. ↵Jeremy Kemper2007-03-061-0/+4
| | | | | | Closes #7719. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6347 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: don't use async_exec and async_query with postgres-pr. Closes #7727.Jeremy Kemper2007-03-061-1/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6346 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix an edge case with dates during the Italian calendar reform! Hehe. Closes ↵Jeremy Kemper2007-03-061-1/+6
| | | | | | #7724. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6341 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix has_many :through << with custom foreign keys. Closes #6466, #7153.Jeremy Kemper2007-03-051-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6336 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix typo in validations documentation. Closes #7669. [ee]Marcel Molina2007-03-031-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6301 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* SQLServer: recognize real column type as Ruby float, correctly schema-dump ↵Jeremy Kemper2007-03-031-11/+21
| | | | | | tables with no indexes or descending indexes. References #7057, #7703. Closes #7333. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6297 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* mysql.rb ignores IOError in finalizer when socket is already closedJeremy Kemper2007-02-261-1/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6241 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Setting fixtures automatically for integration tests is a bit harder -- will ↵David Heinemeier Hansson2007-02-251-0/+2
| | | | | | have to wait until the test superclass reform is implemented git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6228 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added fixtures :all to test_helper.rb to assume that most people just want ↵David Heinemeier Hansson2007-02-251-3/+12
| | | | | | all their fixtures loaded all the time [DHH] Added fixtures :all as a way of loading all fixtures in the fixture directory at once (closes #7214) [manfred] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6227 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.8.6 compatibility.Jeremy Kemper2007-02-221-3/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6204 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use the query cache iff Active Record is configured.Jeremy Kemper2007-02-221-8/+16
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6202 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added database connection as a yield parameter to ↵David Heinemeier Hansson2007-02-212-1/+17
| | | | | | ActiveRecord::Base.transaction so you can manually rollback [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6196 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed query cache when multiple database connections were involvedTobias Lütke2007-02-211-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6195 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Enable active record cache automatically for all actionsTobias Lütke2007-02-212-15/+27
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6189 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* You can now use cache in instance hierachies. This allows ↵Tobias Lütke2007-02-201-3/+15
| | | | | | ActiveRecord::Base.cache { } usage to cache everything git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6179 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made increment_counter/decrement_counter play nicely with optimistic ↵Jamis Buck2007-02-072-4/+44
| | | | | | locking, and added a more general update_counters method git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6139 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Introducing Model.cache { ... } for the occasional query caching needs. ( ↵Tobias Lütke2007-02-061-18/+33
| | | | | | fantastic to reduce the 200 SELECT * from accounts WHERE id=1 queries in your views ) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6138 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* When dealing with SQLite3, use the table_info pragma helper, so that the ↵Jamis Buck2007-01-301-1/+9
| | | | | | bindings can do some translation for when sqlite3 breaks incompatibly between point releases. Also, make current_adapter? use is_a? instead of instance_of? to account correctly for adapter subclassing. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6091 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oracle: fix lob and text default handling. Closes #7344.Jeremy Kemper2007-01-291-2/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6090 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* SQLServer: don't choke on strings containing 'null'. Closes #7083.Jeremy Kemper2007-01-281-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6084 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* MySQL: blob and text columns may not have defaults in 5.x. Update fixtures ↵Jeremy Kemper2007-01-281-4/+10
| | | | | | schema for strict mode. Closes #6695. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6074 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* update_all can take a Hash argument. sanitize_sql splits into two methods ↵Jeremy Kemper2007-01-281-6/+28
| | | | | | for conditions and assignment since NULL values and delimiters are handled differently. References #6583, closes #7365. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6073 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* MySQL: SET SQL_AUTO_IS_NULL=0 so 'where id is null' doesn't select the last ↵Jeremy Kemper2007-01-281-0/+4
| | | | | | inserted id. Closes #6778. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6064 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use Date#to_s(:db) for quoted dates. Closes #7411.Jeremy Kemper2007-01-282-7/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6061 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't create instance writer methods for class attributes. Closes #7401 [Rick]Rick Olson2007-01-284-14/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6051 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Nodoc the irrelevant (from 1.2)David Heinemeier Hansson2007-01-265-9/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6044 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Docs: validations examples. Closes #7343.Jeremy Kemper2007-01-241-13/+74
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6031 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixtures use the table name and connection from set_fixture_class. Closes #7330.Jeremy Kemper2007-01-241-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6023 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove useless code in #attribute_present? since 0 != blank?. Closes #7249 ↵Rick Olson2007-01-232-3/+3
| | | | | | [Josh Susser]. Fix minor doc typos. Closes #7157 [Josh Susser] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6018 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix incorrect usage of #classify when creating the eager loading join ↵Rick Olson2007-01-231-5/+5
| | | | | | statement. Closes #7044 [Josh Susser] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6017 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* SQLServer: quote table name in indexes query. Closes #2928.Jeremy Kemper2007-01-231-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6014 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Subclasses of an abstract class work with single-table inheritance. ↵Jeremy Kemper2007-01-231-2/+7
| | | | | | References #5704, closes #7284. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6013 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make sure sqlite3 driver closes open connections on disconnect (closes #7105)Jamis Buck2007-01-221-0/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6012 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* [DOC] clear up some ambiguity with the way has_and_belongs_to_many creates ↵Rick Olson2007-01-161-1/+7
| | | | | | the default join table name. #7072 [jeremymcanally] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5960 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow the Oracle adapter to insert a string "null". Closes #6997 [laurelfan]Michael Koziarski2007-01-161-1/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5958 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve handling of LoadErrors with the oracle adapter. Closes #6780 [kubo]Michael Koziarski2007-01-162-3/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5956 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made sure that connections are only removed for SQLiteDavid Heinemeier Hansson2007-01-153-4/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5955 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* be like a duck. Let's not rely on explicit classes, so we can pass proxy ↵Jamis Buck2007-01-154-31/+47
| | | | | | objects around and have them interpreted correctly by ActiveRecord's serialization routines git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5953 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Skip column options for primary keys. Closes #7048.Jeremy Kemper2007-01-153-8/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5944 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve association documentation, closes #7022. [hasmanyjosh]Michael Koziarski2007-01-151-1/+65
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5939 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* change_column accepts :default => nil. Closes #6956.Jeremy Kemper2007-01-159-29/+34
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5937 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* MySQL, PostgreSQL: change_column_default quotes the default value and ↵Jeremy Kemper2007-01-152-2/+2
| | | | | | doesn't lose column type information. References #3987, closes #6664. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5935 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oracle: create_table takes a :sequence_name option to override the ↵Jeremy Kemper2007-01-153-6/+8
| | | | | | 'tablename_seq' default. Closes #7000. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5933 5ecf4fe2-1ee6-0310-87b1-e25e094e27de