aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/associations_go_eager_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fixed eager loading problems with single-table inheritance [Rick Olson] ↵David Heinemeier Hansson2006-03-051-4/+4
| | | | | | 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-041-5/+5
| | | | | | :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
* Allow has_many :through to work with :include [Michael Schoen]. Closes #3611Michael Koziarski2006-02-101-1/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3566 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* * Fix pagination problems when using includeMichael Koziarski2006-02-091-10/+18
| | | | | | | | | | * Introduce Unit Tests for pagination * Allow count to work with :include by using count distinct. [Kevin Clark & Jeremy Hopple] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3553 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix some test failures due to MySQL assumptions. Closes #3149.Jeremy Kemper2005-12-081-4/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3254 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that using :include together with :conditions array in Base.find would ↵David Heinemeier Hansson2005-12-081-0/+24
| | | | | | cause NoMethodError (closes #2887) [Paul Hammmond] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3240 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3095@asus: jeremy | 2005-11-15 22:40:51 -0800Jeremy Kemper2005-11-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Ticket #1874 - Firebird adapter r3107@asus: jeremy | 2005-11-16 00:06:14 -0800 quote column aliases r3108@asus: jeremy | 2005-11-16 00:08:12 -0800 quote columns in construct_conditions_from_arguments. update sequence_name docs. introduce prefetched primary keys. r3109@asus: jeremy | 2005-11-16 00:09:08 -0800 double-quote rather than single-quote sqlite columns r3110@asus: jeremy | 2005-11-16 00:09:56 -0800 quote column names and use attribute_condition in validates_uniqueness_of r3111@asus: jeremy | 2005-11-16 00:12:24 -0800 Use QUOTED_TYPE constant in tests r3112@asus: jeremy | 2005-11-16 00:13:28 -0800 restrict test_inserts_with_pre_and_suffix to those adapters which support migrations r3113@asus: jeremy | 2005-11-16 00:14:09 -0800 Use QUOTED_TYPE constant in tests r3114@asus: jeremy | 2005-11-16 00:14:30 -0800 Use QUOTED_TYPE constant in tests git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3051 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added :include as an option for association declarations [DHH]David Heinemeier Hansson2005-11-061-0/+25
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2898 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r2736@asus: jeremy | 2005-10-24 17:08:12 -0700Jeremy Kemper2005-10-251-1/+1
| | | | | | | | | | | | | | | | | | | Test for eager associations with limits should not assume that records are ordered by id. r2737@asus: jeremy | 2005-10-24 19:06:09 -0700 Fail fast if invalid primary key column. r2746@asus: jeremy | 2005-10-25 15:37:28 -0700 Begin rollback of fixture delete order. Its solves a problem for 1% of users who already have a workaround while severely slowing down the other 99%. r2747@asus: jeremy | 2005-10-25 16:03:01 -0700 Rollback the rest. r2748@asus: jeremy | 2005-10-25 16:06:26 -0700 Re-add fixtures declaration to conditions scoping test r2749@asus: jeremy | 2005-10-25 16:09:03 -0700 Re-add fixtures declaration to finder test r2750@asus: jeremy | 2005-10-25 16:13:50 -0700 Don't assume keyboards table is empty git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2730 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added support for using limits in eager loads that involve has_many and ↵David Heinemeier Hansson2005-10-181-2/+29
| | | | | | has_and_belongs_to_many associations git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2675 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Wrap :conditions in parentheses to prevent problems with OR's #1871Jamis Buck2005-09-241-8/+13
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2324 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix eager loading error messages, allow :include to specify tables using ↵Nicholas Seckar2005-09-181-0/+10
| | | | | | strings or symbols. Closes #2222 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2258 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make all tests pass on PGSQL #1759 [Rick Olson]David Heinemeier Hansson2005-07-171-4/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1844 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added support for limit and offset with eager loading of has_one and ↵David Heinemeier Hansson2005-07-111-2/+43
| | | | | | belongs_to associations. Using the options with has_many and has_and_belongs_to_many associations will now raise an ActiveRecord::ConfigurationError #1692 [Rick Olsen] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1811 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r2979@asus: jeremy | 2005-07-10 01:51:00 -0700Jeremy Kemper2005-07-101-11/+9
| | | | | | | | | | | | | Split association reflection test into has_many and has_one tests. TODO: extend to belongs_to and habtm as well. Kill trailing whitespace. r2980@asus: jeremy | 2005-07-10 01:53:41 -0700 Test that eager load of firm.account (a has_one) returns the correct account. This doesn't cover the regression in Ticket #1688, however. Need a case where class name is not provided and the singular name is over-singularized by active_record.class_name. Kill trailing whitespace. r2981@asus: jeremy | 2005-07-10 01:56:44 -0700 Fix class name resolution in AssociationReflection#name_to_class_name. Use the equivalent of the idiomatic ||= (read or write if nil) for the class_inheritable_attribute reflection arrays. Kill trailing whitespace. r2982@asus: jeremy | 2005-07-10 01:59:08 -0700 Remove superfluous assignment in compute_type. In an inject, the return value is used for the next injection, so assigning to the injected value is unnecessary. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1790 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* better error message for missing associations #1631 [courtenay]David Heinemeier Hansson2005-07-091-0/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1787 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make postgres8 ar tests work #1601 [Tobias Luetke]David Heinemeier Hansson2005-07-041-2/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1668 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that single-table inheritance sub-classes couldn't be used to limit ↵David Heinemeier Hansson2005-07-031-4/+27
| | | | | | the result set with eager loading #1215 [Chris McGrath] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1619 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't expect fixtures to be returned in the order they were inserted.Jeremy Kemper2005-06-111-2/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1402 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Eager loading of dependent has_one associations won't delete the association ↵Jamis Buck2005-06-101-13/+22
| | | | | | #1212. Also, starting to refactor the tests to make them speedier, with optional support for transactional fixtures. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1398 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed order of loading in eager associationsDavid Heinemeier Hansson2005-04-191-1/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1229 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed stray comma when using eager loading and ordering together from ↵David Heinemeier Hansson2005-04-191-1/+1
| | | | | | has_many associations #1143 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1220 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Changed habtm eager loading to also use joinsDavid Heinemeier Hansson2005-04-181-7/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1201 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixes for postgresql testing #1129, #1130, #1131David Heinemeier Hansson2005-04-181-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1199 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Dont initialize the association proxy for nil recordsDavid Heinemeier Hansson2005-04-141-0/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1165 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added support for has_and_belongs_to_many associations in eager loading ↵David Heinemeier Hansson2005-04-101-4/+13
| | | | | | #1064 [Dan Peterson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1132 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made eager loading work with inheritance hierarchies #1065 [Ryan Carver]David Heinemeier Hansson2005-04-101-0/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1131 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made eager loading work even moreDavid Heinemeier Hansson2005-04-031-0/+36
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1083 5ecf4fe2-1ee6-0310-87b1-e25e094e27de