Jeremy Kemper
c4782f7393
More succinct current_adapter? Enable locking duel for Oracle.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4576 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-07 10:48:43 +00:00
Jeremy Kemper
40bdbba48d
Oracle: use nonblocking queries if allow_concurrency is set, fix pessimistic locking, don't guess date vs. time by default (set OracleAdapter.emulate_dates = true for the old behavior), adapter cleanup. Closes #5635 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4574 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-07 10:42:14 +00:00
Jeremy Kemper
40d8d77c64
Rename test file so it runs for MySQL only.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4571 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-06 17:30:54 +00:00
David Heinemeier Hansson
bffb29fb7d
Fixed test
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4556 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-05 18:09:49 +00:00
David Heinemeier Hansson
784165e03b
Fixed a few Oracle issues: Allows Oracle's odd date handling to still work consistently within #to_xml, Passes test that hardcode insert statement by dropping the :id column, Updated RUNNING_UNIT_TESTS with Oracle instructions, Corrects method signature for #exec #5294 [schoenm@earthlink.net]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4552 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-05 02:54:19 +00:00
David Heinemeier Hansson
73c80169c8
rake should run active_schema_mysql_test.rb ( closes #5390 )
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4549 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-05 02:30:37 +00:00
David Heinemeier Hansson
b272100f05
Doc fix ( closes #5504 ) [lee@omara.ca]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4543 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-05 01:43:47 +00:00
Jeremy Kemper
6a1a1e5536
r4738@asus: jeremy | 2006-06-29 20:18:43 -0700
...
Observers also watch subclasses created after they are declared. Closes #5535 .
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4521 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-30 04:38:24 +00:00
Jeremy Kemper
42775686d2
PostgreSQL: support microsecond time resolution. Closes #5492 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4494 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-25 18:04:06 +00:00
Nicholas Seckar
d9125093e8
Add AssociationCollection#sum since the method_missing invokation has been shadowed by Enumerable#sum. Closes #5500 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4493 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-25 17:49:24 +00:00
Sam Stephenson
d19e46421c
Added find_or_initialize_by_X which works like find_or_create_by_X but doesn't save the newly instantiated record
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4473 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-20 22:48:52 +00:00
Jeremy Kemper
ef77ec7710
r4669@asus: jeremy | 2006-06-20 12:53:36 -0700
...
Getting picayune with locking_test. Closes #4871 .
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4472 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-20 19:54:35 +00:00
Jeremy Kemper
722e0b6a8b
r4664@asus: jeremy | 2006-06-19 18:55:36 -0700
...
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
2006-06-20 01:58:36 +00:00
Jeremy Kemper
15aa6e0552
r4644@asus: jeremy | 2006-06-16 14:57:03 -0700
...
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
2006-06-19 22:48:51 +00:00
Nicholas Seckar
e5fc5aaffe
Change AR::Base#to_param to return a String instead of a Fixnum. Closes #5320 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4459 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-19 16:45:34 +00:00
David Heinemeier Hansson
2e65e8ccc6
Refactored ActiveRecord::Base.to_xml to become a delegate for XmlSerializer, 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
2006-06-04 00:33:52 +00:00
David Heinemeier Hansson
c5ec16e583
Added simple hash conditions to find that'll just convert hash to an 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
2006-06-03 22:15:06 +00:00
David Heinemeier Hansson
cb62f06dcf
Fixed issues with BLOB limits, charsets, and booleans for Firebird ( closes #5194 , #5191 , #5189 ) [kennethkunz@gmail.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4424 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-03 21:57:03 +00:00
David Heinemeier Hansson
9c0fb70e1e
For Firebird adapter
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4423 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-03 21:52:22 +00:00
David Heinemeier Hansson
d016d9a6d4
Fixed usage of :limit and with_scope when the association in scope is a 1:m ( closes #5208 ) [alex@purefiction.net]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4422 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-03 21:51:57 +00:00
David Heinemeier Hansson
6a9f47f33f
Make more Firebird tests pass ( closes #5188 ) [kennethkunz@gmail.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4420 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-03 21:47:29 +00:00
David Heinemeier Hansson
7f00f51239
Fixed migration trouble with SQLite when NOT NULL is used in the new definition ( closes #5215 ) [greg@lapcominc.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4419 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-03 21:41:40 +00:00
David Heinemeier Hansson
4394e402b7
Fixed that count distinct should use the selected column even when using :include ( closes #5251 ) [anna@wota.jp]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4417 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-03 21:19:36 +00:00
David Heinemeier Hansson
1671609063
Fixed that has_many.create ended up with duplicate objects ( closes #5250 ) [daniel@nouvelles-solutions.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4416 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-03 21:16:50 +00:00
Jeremy Kemper
48052d70ec
to_xml fixes, features, and speedup. Closes #4989 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4413 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-03 00:01:08 +00:00
Jeremy Kemper
49060cda24
fixtures :accounts for base_test. Closes #5268 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4412 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-02 22:48:54 +00:00
Jeremy Kemper
74b7bfa6d2
Mind the order of things.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4393 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-01 02:04:35 +00:00
Jeremy Kemper
b09d02c9e8
Records and arrays of records are bound as quoted ids.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4391 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-01 01:43:20 +00:00
David Heinemeier Hansson
9fcc0654c3
Fixed that Base.find :all, :conditions => [ "id IN (?)", collection ] would fail if collection was empty [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4390 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-01 00:43:02 +00:00
David Heinemeier Hansson
408fe5facc
Added Array#to_s(:db) that'll produce a comma-separated list of ids [DHH] Split Grouping into its own file
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4387 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-31 23:25:36 +00:00
Rick Olson
05a17dc6b5
Add a list of regexes assert_queries skips in the ActiveRecord test suite. [Rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4385 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-31 20:47:03 +00:00
Rick Olson
cc88679c0c
band-aid for oracle
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4380 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-29 04:22:49 +00:00
Rick Olson
06075a9eb5
Fix the has_and_belongs_to_many #create doesn't populate the join for new records. Closes #3692 [josh@hasmanythrough.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4379 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-29 03:48:17 +00:00
Rick Olson
ea51d72edb
Provide Association Extensions access to the instance that the association 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
2006-05-28 21:33:34 +00:00
David Heinemeier Hansson
cc1c943aa1
Make Oracle happy
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4357 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-21 22:17:56 +00:00
David Heinemeier Hansson
66586bc168
Fixed that has_many collections shouldn't load the entire association to do build or create [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4354 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-21 19:17:37 +00:00
David Heinemeier Hansson
59c8c63ecd
Added :allow_nil option for aggregations ( closes #5091 ) [ian.w.white@gmail.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4353 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-21 17:32:37 +00:00
Marcel Molina
d22f9c9488
Fix Oracle boolean support and tests. Closes #5139 . [schoenm@earthlink.net]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4351 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-21 15:13:28 +00:00
Jeremy Kemper
c50113bc61
create! no longer blows up when no attributes are passed and a :create scope 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
2006-05-19 01:05:20 +00:00
Rick Olson
be3a4849a9
Call Inflector#demodulize on the class name when eagerly including an STI model. Closes #5077 [info@loobmedia.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4342 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-15 14:08:51 +00:00
Marcel Molina
9c5591da2d
Preserve MySQL boolean column defaults when changing a column in a migration. Closes #5015 . [pdcawley@bofh.org.uk]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4340 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-14 18:37:22 +00:00
Jeremy Kemper
f9f65433ef
Wipe those tears.. References [4335].
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4338 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-12 05:15:17 +00:00
Jeremy Kemper
491b4a3c84
PostgreSQL: migrations support :limit with :integer columns by mapping limit < 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
2006-05-12 03:59:43 +00:00
Jeremy Kemper
d08d89c092
Dates and times interpret empty strings as nil rather than 2000-01-01. Closes #4830 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4327 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-07 07:52:08 +00:00
Jeremy Kemper
d59f3a78a4
uniq preserves order. References [4325].
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4326 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-07 02:03:25 +00:00
Jeremy Kemper
50f538b72b
Allow :uniq => true with has_many :through associations.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4325 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-06 23:37:56 +00:00
Marcel Molina
3fec943aca
Allow AR::Base#to_xml to include methods too. Closes #4921 . [johan@textdrive.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4314 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-29 23:00:47 +00:00
Marcel Molina
f42403ff49
Remove duplicate fixture entry in comments.yml. Closes #4923 . [Blair Zajac <blair@orcaware.com>]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4305 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-29 05:02:54 +00:00
Marcel Molina
b2c0ddf033
Add support for FrontBase ( http://www.frontbase.com/ ) with a new adapter thanks to the hard work of one Mike Laster. Closes #4093 . [mlaster@metavillage.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4291 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-27 22:39:45 +00:00
Marcel Molina
91531372f9
Add support for :order option to with_scope. Closes #3887 . [eric.daspet@survol.net]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4274 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-26 06:37:04 +00:00