aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
Commit message (Collapse)AuthorAgeFilesLines
* Making ActiveRecord faster [skaes]David Heinemeier Hansson2006-03-273-94/+152
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4069 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed eager loading so that an aliased table cannot clash with a ↵Rick Olson2006-03-272-2/+4
| | | | | | has_and_belongs_to_many join table [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4066 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add support for :include to with_scope [andrew@redlinesoftware.com]Michael Koziarski2006-03-276-20/+101
| | | | | | | | | Remove overrated warning from adapter_test git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4064 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Support the use of public synonyms with the Oracle adapter; required ↵David Heinemeier Hansson2006-03-262-0/+3
| | | | | | ruby-oci8 v0.1.14 (closes #4390) [schoenm@earthlink.net] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4055 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Only string_to_binary if the column respondsDavid Heinemeier Hansson2006-03-264-4/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4040 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Change periods (.) in table aliases to _'s. Closes #4251 ↵Rick Olson2006-03-263-1/+4
| | | | | | [jeff@ministrycentered.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4039 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Changed has_and_belongs_to_many join to INNER JOIN for Mysql 3.23.x. Closes ↵Rick Olson2006-03-262-1/+3
| | | | | | #4348 [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4038 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed issue that kept :select options from being scoped [Rick]Rick Olson2006-03-264-3/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4036 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* The Ruby path should be a string (closes #4361) [DHH]David Heinemeier Hansson2006-03-251-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4033 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Do it in styleDavid Heinemeier Hansson2006-03-251-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4032 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed db_schema_import when binary types are present (closes #3101) [DHH]David Heinemeier Hansson2006-03-252-1/+18
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4031 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that MySQL enums should always be returned as strings (closes #3501) [DHH]David Heinemeier Hansson2006-03-252-0/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4028 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* remove some documentation cruft on has_manyRick Olson2006-03-241-3/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4023 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Change has_many :through to use the :source option to specify the source ↵Rick Olson2006-03-247-21/+83
| | | | | | association. :class_name is now ignored. [Rick Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4022 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* STI associations are now aliased to the table name for backwards ↵Rick Olson2006-03-231-9/+54
| | | | | | compatibility. Added docs for table aliasing [Rick Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4015 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed DB2 adapter so nullable columns will be determines correctly now and ↵David Heinemeier Hansson2006-03-223-4/+7
| | | | | | quotes from column default values will be removed (closes #4350) [contact@maik-schmidt.de] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4013 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* fix test so that it passesRick Olson2006-03-221-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4009 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow overriding of find parameters in scoped has_many :through calls [Rick ↵Rick Olson2006-03-214-10/+41
| | | | | | Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4007 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* add self referential has_many :through example [Rick]Rick Olson2006-03-214-2/+29
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4006 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix bug introduced by changeset 3679 which caused custom attribute? methods ↵David Heinemeier Hansson2006-03-203-9/+31
| | | | | | to be overridden. Also ensure that ? methods are defined even if read method is customised. (closes #3677) [jonathan@bluewire.net.nz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4002 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that schema changes while the database was open would break any ↵David Heinemeier Hansson2006-03-201-11/+15
| | | | | | connections to a SQLite database (now we reconnect if that error is throw) [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3998 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that schema changes while the database was open would break any ↵David Heinemeier Hansson2006-03-202-2/+16
| | | | | | connections to a SQLite database (now we reconnect if that error is throw) [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3997 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't classify the has_one class when eager loading, it is already singular. ↵Rick Olson2006-03-195-15/+38
| | | | | | Add tests. (closes #4117) [jonathan@bluewire.net.nz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3983 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* add support for COUNT(DISTINCT id) queries in sqlite2 (closes #4300) [Rick ↵Rick Olson2006-03-192-5/+22
| | | | | | Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3979 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* skip count_by_sql test using COUNT(DISTINCT) for sqlite2 onlyRick Olson2006-03-191-2/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3978 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix boolean testDavid Heinemeier Hansson2006-03-191-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3977 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Quit ignoring default :include options in has_many :through calls [Mark James]Rick Olson2006-03-196-14/+49
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3974 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow has_many :through associations to find the source association by ↵Rick Olson2006-03-196-11/+28
| | | | | | setting a custom class (closes #4307) [jonathan@bluewire.net.nz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3973 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remember kiddies, Dir[] uses Dir#glob, not a RegexpRick Olson2006-03-191-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3970 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* forgot to save changelog... dohRick Olson2006-03-191-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3968 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Eager Loading support added for has_many :through => :has_many associations ↵Rick Olson2006-03-192-6/+24
| | | | | | (see below). [Rick Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3967 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Only run migrations that look like migrationsDavid Heinemeier Hansson2006-03-191-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3966 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Small pgsql fixes (closes #4083) [pergesu@gmail.com]David Heinemeier Hansson2006-03-192-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3965 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow has_many :through to work on has_many associations (closes #3864) ↵Rick Olson2006-03-195-19/+73
| | | | | | [sco@scottraymond.net] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3964 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* add ticket # to changesetRick Olson2006-03-191-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3962 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Raise error when trying to select many polymorphic objects with has_many ↵Rick Olson2006-03-197-27/+104
| | | | | | :through or :include (closes #4226) [josh@hasmanythrough.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3961 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed has_many :through to include :conditions set on the :through ↵Rick Olson2006-03-187-19/+48
| | | | | | association. closes #4020 [jonathan@bluewire.net.nz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3958 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix that has_many :through honors the foreign key set by the belongs_to ↵Rick Olson2006-03-188-2/+22
| | | | | | association in the join model (closes #4259) [andylien@gmail.com / Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3954 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added more tests to validates_format_of (closes #3142) [jp.bougie@gmail.com]David Heinemeier Hansson2006-03-181-0/+28
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3951 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* SQL Server adapter gets some love (closes #4298) [rtomayko@gmail.com]David Heinemeier Hansson2006-03-186-16/+53
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3949 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix incorrect mysql column type (requires AR test DB to be rebuilt) (closes ↵Jamis Buck2006-03-181-1/+1
| | | | | | #4299) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3943 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Update lingering uses of deprecated association dependency options (closes ↵David Heinemeier Hansson2006-03-187-12/+12
| | | | | | #4169) [coffe2code] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3941 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that eager loading from belongs_to would cause the association to be ↵David Heinemeier Hansson2006-03-182-1/+3
| | | | | | double-singularized (closes #4117) [jonathan@bluewire.net.nz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3940 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* fixed has_many :conditions sanitizing (closes #4278) [hakuja@hakuja.net]Rick Olson2006-03-183-4/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3935 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added OpenBase database adapter that builds on top of the ↵David Heinemeier Hansson2006-03-1811-8/+689
| | | | | | http://www.spice-of-life.net/ruby-openbase/ driver. All functionality except LIMIT/OFFSET is supported (closes #3528) [derrickspell@cdmplus.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3932 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* StylingDavid Heinemeier Hansson2006-03-181-8/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3929 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* remove spaceRick Olson2006-03-181-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3922 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Rework table aliasing to account for truncated table aliases. Add smarter ↵Rick Olson2006-03-186-36/+80
| | | | | | table aliasing when doing eager loading of STI associations. This allows you to use the association name in the order/where clause. [Jonathan Viney / Rick Olson] closes #4108 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3921 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add AbstractAdapter#table_alias_for to create table aliases according to the ↵Rick Olson2006-03-187-0/+43
| | | | | | rules of the current adapter. [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3916 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Provide access to the underlying database connection with ↵Michael Koziarski2006-03-182-1/+10
| | | | | | Adapter#raw_connection, allows the use of db-specific methods such as postgresql's lo_* . Closes #2090 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3914 5ecf4fe2-1ee6-0310-87b1-e25e094e27de