aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Remove broken attempts at handling columns with a a default of 'now()' in ↵Michael Koziarski2006-03-183-14/+2
| | | | | | the postgresql adapter. Closes #2257 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3913 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added connection#current_database that'll return of the current database ↵David Heinemeier Hansson2006-03-184-2/+20
| | | | | | (only works in MySQL, SQL Server, and Oracle so far -- please help implement for the rest of the adapters) (closes #3663) [Tom ward] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3911 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Nicer error message on has_many :through when :through reflection can not be ↵David Heinemeier Hansson2006-03-184-1/+11
| | | | | | found (closes #4042) [court3nay@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3910 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that Migration#execute would have the table name prefix appended to ↵David Heinemeier Hansson2006-03-182-1/+3
| | | | | | its query (closes #4110) [mark.imbriaco@pobox.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3909 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix test db setup for pgsql (closes #4220) [mlaster@metavillage.com]David Heinemeier Hansson2006-03-181-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3907 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* The style police makes an expection on acts_as_tree (closes #4168) [coffee2code]David Heinemeier Hansson2006-03-181-25/+29
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3906 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added migrations support to the Sybase adapter (closes #4293) [John R. Sheets]David Heinemeier Hansson2006-03-188-52/+142
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3905 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make all tinyint(1) variants act like boolean in mysql (tinyint(1) unsigned, ↵Jamis Buck2006-03-172-1/+3
| | | | | | etc.) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3902 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* remove some commented-out cruftRick Olson2006-03-161-4/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3898 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use association's :conditions when eager loading. [jeremyevans0@gmail.com] ↵Rick Olson2006-03-1613-18/+93
| | | | | | closes #4144 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3897 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* fix AR tests for sqliteRick Olson2006-03-161-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3896 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Alias the has_and_belongs_to_many join table on eager includes. closes #4106 ↵Rick Olson2006-03-163-12/+32
| | | | | | [jeremyevans0@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3895 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Change LEFT OUTER JOIN authors AS authors to LEFT OUTER JOIN authors authors ↵David Heinemeier Hansson2006-03-161-9/+9
| | | | | | so associations will work for Oracle again (closes #4231) [schoenm@earthlink.net] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3891 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* fix test_find_in_association_with_options test, tweak other tests affected ↵Rick Olson2006-03-164-17/+21
| | | | | | by developer/project addition git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3890 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oracle adapter gets some love #4230 [schoenm@earthlink.net]David Heinemeier Hansson2006-03-163-6/+28
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3889 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Stop the MySQL adapter crashing when views are present. (closes #3782) ↵David Heinemeier Hansson2006-03-162-1/+18
| | | | | | [Jonathan Viney] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3886 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* added test checking that NOT NULL is properly reflected on ↵Rick Olson2006-03-161-1/+8
| | | | | | [nathaniel@talbott.ws] closes #4125 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3885 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Base.abstract_class? that marks which classes are not part of the ↵Rick Olson2006-03-1611-16/+62
| | | | | | Active Record hierarchy. closes #3704 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3882 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow :dependent options to be used with polymorphic joins. #3820 [Rick Olson]Rick Olson2006-03-166-9/+99
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3881 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Upgrade to Transaction::Simple 1.3Jamis Buck2006-03-152-702/+695
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3875 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* fix calculation tests to get around inconsistent ordering of nilsRick Olson2006-03-151-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3872 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* make save! return true on success[johan@johansorensen.com]. Closes #4173Michael Koziarski2006-03-153-1/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3871 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Unit test fixes for postgresql.Michael Koziarski2006-03-152-3/+5
| | | | | | | | Allow to_xml tests to pass in time zones other than CST. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3870 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Correct syntax error in postgresql schema definitionMichael Koziarski2006-03-151-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3868 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Catch FixtureClassNotFound when using instantiated fixtures on a fixture ↵Rick Olson2006-03-143-3/+7
| | | | | | that has no ActiveRecord model [Rick Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3866 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow ordering of calculated results and/or grouped fields in calculations ↵Rick Olson2006-03-143-0/+14
| | | | | | [solo@gatelys.com] closes #4228 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3865 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Dynamically set allow_concurrency. Closes #4044.Jeremy Kemper2006-03-135-31/+78
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3862 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Passing commentDavid Heinemeier Hansson2006-03-101-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3835 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added options to control the :only/:except for included associations on ↵David Heinemeier Hansson2006-03-102-7/+22
| | | | | | Base#to_xml [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3832 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added association inclusion in to_xml [DHH]David Heinemeier Hansson2006-03-103-15/+111
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3831 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed to_xml across the board to use nice indention, better skip_attributes ↵David Heinemeier Hansson2006-03-093-0/+79
| | | | | | workings, no type on strings, and cleaned tests [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3829 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix counter cache setting in belongs-to proxyJamis Buck2006-03-091-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3828 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add suppress_messages to migrations, to temporarily turn off verbose messagesJamis Buck2006-03-091-0/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3827 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* a few more tests for the custom counter_cache naming codeJamis Buck2006-03-092-18/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3826 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow counter_cache to accept a column nameJamis Buck2006-03-095-14/+42
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3825 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* format fix for locking [Michael Koziarski]Michael Koziarski2006-03-093-5/+10
| | | | | | | Add documentation for :dependent on associations. [robby@planetargon.com] Closes #4151 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3822 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow set_fixture_class to take Classes instead of strings for a class in a ↵Rick Olson2006-03-063-8/+20
| | | | | | module. Raise FixtureClassNotFound if a fixture can't load. [Rick Olson] closes #4095 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3804 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix quoting of inheritance column for STI eager loading #4098 [Jonathan ↵Rick Olson2006-03-062-7/+9
| | | | | | Viney <jonathan@bluewire.net.nz>] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3790 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* slight change to eager associations table aliasing: use class_reflection, ↵Rick Olson2006-03-062-3/+3
| | | | | | like 'post_comments' or 'tree_children' git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3788 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* added assert_queries for the AR test suiteRick Olson2006-03-052-2/+13
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3784 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Doc fixesDavid Heinemeier Hansson2006-03-051-1/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3782 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Doc fixesDavid Heinemeier Hansson2006-03-051-3/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3780 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed eager loading problems with single-table inheritance [Rick Olson] ↵David Heinemeier Hansson2006-03-0510-63/+144
| | | | | | Added smarter table aliasing for eager associations for multiple self joins [Rick Olson] (closes #3580) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3776 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added cascading eager loading that allows for queries like Author.find(:all, ↵David Heinemeier Hansson2006-03-044-138/+349
| | | | | | :include=> { :posts=> :comments }), which will fetch all authors, their posts, and the comments belonging to those posts in a single query (using LEFT OUTER JOIN) #3913 [anna@wota.jp] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3769 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make counter cache work when replacing an association (closes #3245). Thanks ↵Jamis Buck2006-03-044-0/+53
| | | | | | for the patch! git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3762 5ecf4fe2-1ee6-0310-87b1-e25e094e27de