aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
Commit message (Collapse)AuthorAgeFilesLines
* r4724@asus: jeremy | 2006-06-28 19:22:46 -0700Jeremy Kemper2006-06-291-33/+17
| | | | | | | Removed deprecated timestamps_gmt class methods. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4511 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r4720@asus: jeremy | 2006-06-28 18:12:57 -0700Jeremy Kemper2006-06-291-2/+4
| | | | | | | Don't be such a hardass. References #5497. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4508 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't assume Active Record is available. Closes #5497.Jeremy Kemper2006-06-281-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4505 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: support microsecond time resolution. Closes #5492.Jeremy Kemper2006-06-252-6/+20
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4494 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add AssociationCollection#sum since the method_missing invokation has been ↵Nicholas Seckar2006-06-251-0/+5
| | | | | | shadowed by Enumerable#sum. Closes #5500. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4493 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Get thereJeremy Kemper2006-06-211-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4484 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* preserve chained method punctuationJeremy Kemper2006-06-211-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4483 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* alias_method_chain preserves method punctuation so foo, foo?, and foo! may ↵Jeremy Kemper2006-06-211-1/+1
| | | | | | be chained with the same feature. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4482 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't use keywords as local vars in documentation. Closes #5291. ↵Rick Olson2006-06-211-4/+4
| | | | | | [jeremy@planetargon.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4477 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added find_or_initialize_by_X which works like find_or_create_by_X but ↵Sam Stephenson2006-06-201-2/+13
| | | | | | doesn't save the newly instantiated record git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4473 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r4664@asus: jeremy | 2006-06-19 18:55:36 -0700Jeremy Kemper2006-06-204-5/+92
| | | | | | | Use the #lock method to obtain a row lock on a single record. Simply reloads the record with :lock => true. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4462 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r4663@asus: jeremy | 2006-06-19 17:23:57 -0700Jeremy Kemper2006-06-202-63/+70
| | | | | | | ActiveRecord::Locking is now ActiveRecord::Locking::Optimistic (to make way for Pessimistic.) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4461 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r4644@asus: jeremy | 2006-06-16 14:57:03 -0700Jeremy Kemper2006-06-197-48/+97
| | | | | | | | | | | | | | | | | | | | | locking r4645@asus: jeremy | 2006-06-17 12:41:30 -0700 missing reply fixture r4646@asus: jeremy | 2006-06-19 13:05:23 -0700 Use a per-thread (rather than global) transaction mutex so you may execute concurrent transactions on separate connections. r4647@asus: jeremy | 2006-06-19 13:07:23 -0700 PostgreSQL: introduce allow_concurrency option which determines whether to use blocking or asynchronous #execute. Adapters with blocking #execute will deadlock Ruby threads. The default value is ActiveRecord::Base.allow_concurrency. r4648@asus: jeremy | 2006-06-19 13:08:40 -0700 Pass the default allow_concurrency when instantiating new connections. r4649@asus: jeremy | 2006-06-19 13:11:12 -0700 Break out concurrent transaction tests and run them for PostgreSQLAdapter only (need to fork or system('some_test_script') for the other adapters) r4650@asus: jeremy | 2006-06-19 13:42:48 -0700 Row locking. Provide a locking clause with the :lock finder option or true for the default "FOR UPDATE". r4661@asus: jeremy | 2006-06-19 15:36:51 -0700 excise the junk mutex git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4460 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Change AR::Base#to_param to return a String instead of a Fixnum. Closes #5320.Nicholas Seckar2006-06-191-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4459 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use explicit delegation instead of method aliasing for AR::Base.to_param -> ↵Jamis Buck2006-06-051-1/+4
| | | | | | AR::Base.id. (closes #5299) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4437 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Refactored ActiveRecord::Base.to_xml to become a delegate for XmlSerializer, ↵David Heinemeier Hansson2006-06-043-264/+312
| | | | | | which restores sanity to the mega method. This refactoring also reinstates the opinions that type="string" is redundant and ugly and nil-differentiation is not a concern of serialization [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4431 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added simple hash conditions to find that'll just convert hash to an ↵David Heinemeier Hansson2006-06-031-9/+39
| | | | | | AND-based condition string (closes #5143) [hcatlin@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4425 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed issues with BLOB limits, charsets, and booleans for Firebird (closes ↵David Heinemeier Hansson2006-06-031-20/+13
| | | | | | #5194, #5191, #5189) [kennethkunz@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4424 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed usage of :limit and with_scope when the association in scope is a 1:m ↵David Heinemeier Hansson2006-06-031-1/+1
| | | | | | (closes #5208) [alex@purefiction.net] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4422 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added disconnect! to Firebird adapter (closes #5210) [kennethkunz@gmail.com]David Heinemeier Hansson2006-06-031-1/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4421 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed migration trouble with SQLite when NOT NULL is used in the new ↵David Heinemeier Hansson2006-06-031-2/+3
| | | | | | definition (closes #5215) [greg@lapcominc.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4419 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed problems with eager loading and counting on SQL Server (closed #5212) ↵David Heinemeier Hansson2006-06-031-4/+6
| | | | | | [kajism@yahoo.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4418 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that count distinct should use the selected column even when using ↵David Heinemeier Hansson2006-06-031-1/+1
| | | | | | :include (closes #5251) [anna@wota.jp] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4417 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that has_many.create ended up with duplicate objects (closes #5250) ↵David Heinemeier Hansson2006-06-031-1/+1
| | | | | | [daniel@nouvelles-solutions.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4416 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that :includes merged from with_scope won't cause the same association ↵David Heinemeier Hansson2006-06-031-1/+1
| | | | | | to be loaded more than once if repetition occurs in the clauses (closes #5253) [alex@purefiction.net] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4415 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* to_xml fixes, features, and speedup. Closes #4989.Jeremy Kemper2006-06-031-27/+183
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4413 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: don't ignore port when host is nil since it's often used to ↵Jeremy Kemper2006-06-021-1/+1
| | | | | | label the domain socket. Closes #5247. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4401 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* delegate AssociationProxy#to_param to the association target so that ↵Rick Olson2006-06-011-1/+2
| | | | | | associated models can be used in routes. [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4398 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Mind the order of things.Jeremy Kemper2006-06-014-1/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4393 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Quell warnings. Closes #5245.Jeremy Kemper2006-06-011-3/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4392 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Records and arrays of records are bound as quoted ids.Jeremy Kemper2006-06-012-3/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4391 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that Base.find :all, :conditions => [ "id IN (?)", collection ] would ↵David Heinemeier Hansson2006-06-011-1/+5
| | | | | | fail if collection was empty [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4390 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix the has_and_belongs_to_many #create doesn't populate the join for new ↵Rick Olson2006-05-292-0/+17
| | | | | | records. Closes #3692 [josh@hasmanythrough.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4379 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Provide Association Extensions access to the instance that the association ↵Rick Olson2006-05-282-1/+20
| | | | | | is being accessed from. Closes #4433 [josh@hasmanythrough.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4372 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Update OpenBase adaterp's maintainer's email address. Closes #5176. [Derrick ↵Marcel Molina2006-05-241-1/+1
| | | | | | Spell] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4366 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add a quick note about :select and eagerly included associations. [Rick]Rick Olson2006-05-231-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4363 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add docs for the :as option in has_one associations. Closes #5144 ↵Rick Olson2006-05-221-1/+3
| | | | | | [cdcarter@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4358 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Minor style tweaksDavid Heinemeier Hansson2006-05-212-8/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4355 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that has_many collections shouldn't load the entire association to do ↵David Heinemeier Hansson2006-05-212-3/+35
| | | | | | build or create [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4354 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added :allow_nil option for aggregations (closes #5091) [ian.w.white@gmail.com]David Heinemeier Hansson2006-05-211-16/+43
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4353 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix Oracle boolean support and tests. Closes #5139. [schoenm@earthlink.net]Marcel Molina2006-05-213-32/+36
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4351 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* create! no longer blows up when no attributes are passed and a :create scope ↵Jeremy Kemper2006-05-191-0/+1
| | | | | | is in effect (e.g. foo.bars.create! failed whereas foo.bars.create!({}) didn't.) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4348 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Call Inflector#demodulize on the class name when eagerly including an STI ↵Rick Olson2006-05-151-1/+1
| | | | | | model. Closes #5077 [info@loobmedia.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4342 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Preserve MySQL boolean column defaults when changing a column in a ↵Marcel Molina2006-05-142-2/+4
| | | | | | migration. Closes #5015. [pdcawley@bofh.org.uk] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4340 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: migrations support :limit with :integer columns by mapping limit ↵Jeremy Kemper2006-05-121-0/+12
| | | | | | < 4 to smallint, > 4 to bigint, and anything else to integer. Closes #2900. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4335 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Dates and times interpret empty strings as nil rather than 2000-01-01. ↵Jeremy Kemper2006-05-071-1/+2
| | | | | | Closes #4830. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4327 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* uniq preserves order. References [4325].Jeremy Kemper2006-05-071-1/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4326 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow :uniq => true with has_many :through associations.Jeremy Kemper2006-05-065-37/+36
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4325 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Namespaced OrderedHash so the Rails implementation does not clash with any ↵Rick Olson2006-04-301-1/+1
| | | | | | others. (fixes #4911) [Julian Tarkhanov] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4318 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure that StringIO is always available for the Schema dumper. [Marcel ↵Marcel Molina2006-04-301-0/+2
| | | | | | Molina Jr.] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4315 5ecf4fe2-1ee6-0310-87b1-e25e094e27de