aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/cascaded_eager_loading_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Deprecate the `:distinct` option for `Relation#count`.Yves Senn2013-03-151-1/+1
| | | | | | | We moved more and more away from passing options to finder / calculation methods. The `:distinct` option in `#count` was one of the remaining places. Since we can now combine `Relation#distinct` with `Relation#count` the option is no longer necessary and can be deprecated.
* Deprecate ActiveRecord::Base.scoped.Jon Leighton2012-07-271-14/+14
| | | | | | | It doesn't serve much purpose now that ActiveRecord::Base.all returns a Relation. The code is moved to active_record_deprecated_finders.
* ActiveRecord::Base.all returns a Relation.Jon Leighton2012-07-271-19/+19
| | | | | | | | | | | Previously it returned an Array. If you want an array, call e.g. `Post.to_a` rather than `Post.all`. This is more explicit. In most cases this should not break existing code, since Relations use method_missing to delegate unknown methods to #to_a anyway.
* find and replace deprecated keysJon Leighton2012-04-271-14/+14
|
* %s/find(:\(first\|last\|all\), \([^()]*\))/scoped(\2).\1/gcI amongst other ↵Jon Leighton2012-04-271-14/+14
| | | | things
* Deprecate inferred JOINs with includes + SQL snippets.Jon Leighton2012-01-161-3/+3
| | | | | | See the CHANGELOG for details. Fixes #950.
* Revert "Deprecate implicit eager loading. Closes #950."Jon Leighton2012-01-161-26/+6
| | | | This reverts commit c99d507fccca2e9e4d12e49b4387e007c5481ae9.
* Deprecate implicit eager loading. Closes #950.Jon Leighton2011-12-291-6/+26
|
* please use ruby -I lib:test path/to/test.rb, or export RUBY_OPTAaron Patterson2011-06-061-1/+1
|
* Refactor Active Record test connection setup. Please see the ↵Jon Leighton2011-06-041-1/+1
| | | | RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
* Opening class CascadedEagerLoadingTest at once.Arun Agrawal2011-05-311-7/+3
|
* Bug fixes:Fadzril Muhamad & Joseph Palermo2011-05-121-1/+3
| | | | | | - If doing a count on a relation that has an :include and a :join, it does a distinct even though it should not. - When doing a count on a relation that has an :include, it always falls back to a old style left join when performing the count. Looks like it was broken here: https://github.com/rails/rails/commit/b9599502c9e738a5a1513e75d08f8d40ed408265
* Merge branch 'master' into nested_has_many_throughJon Leighton2010-11-081-1/+1
|\ | | | | | | | | Conflicts: activerecord/lib/active_record/associations.rb
| * Fixes queries using limits and punctuation in order, removes order("col1, ↵Santiago Pastorino2010-11-051-1/+1
| | | | | | | | | | | | col2") usage in favor of order(["col1", "col2"}) [#4597 state:committed]
* | Update new tests in cascaded_eager_loading_test.rb to work with the modified ↵Jon Leighton2010-10-311-6/+6
| | | | | | | | fixtures in this branch
* | Fix bug with 0bb85ed9ffa9808926b46e8f7e59cab5b85ac19f which missed out a ↵Jon Leighton2010-10-311-1/+2
| | | | | | | | fixtures declaration in cascaded_eager_loading_test.rb
* | Merge branch 'master' into nested_has_many_throughJon Leighton2010-10-311-0/+26
|\| | | | | | | | | | | Conflicts: activerecord/lib/active_record/associations/has_many_association.rb activerecord/lib/active_record/associations/through_association_scope.rb
| * Fix issues when including the same association multiple times and mixing ↵Ernie Miller2010-10-301-0/+26
| | | | | | | | joins/includes together.
| * Add some tests for functionality in JoinAssociation which already exists but ↵Jon Leighton2010-10-131-4/+4
| | | | | | | | was previously untested
* | Properly support conditions on any of the reflections involved in a nested ↵Jon Leighton2010-10-191-3/+3
| | | | | | | | through association
* | Refactoring JoinDependency and friends. This improves the code (IMO) ↵Jon Leighton2010-10-061-4/+4
| | | | | | | | including adding some explanatory comments, but more importantly structures it in such a way as to allow a JoinAssociation to produce an arbitrary number of actual joins, which will be necessary for nested has many through support. Also added 3 tests covering functionality which existed but was not previously covered.
* | Fix the tests (I have actually verified that these are also the 'right' ↵Jon Leighton2010-10-031-9/+9
|/ | | | fixes, rather than just making the tests pass again)
* removing unused models from testsSubba Rao Pasupuleti2010-07-211-1/+0
| | | | | | [#5153 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* fixing typeo. thanks bamnet!Aaron Patterson2010-07-161-1/+1
|
* JoinDependency#graft does not properly set parent join [#5124 state:resolved]David Genord II2010-07-161-0/+7
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Order is not guaranteed here, ordering by id of people table makes it workSantiago Pastorino2010-06-251-2/+2
|
* Make sure about which is the first element of the query, fixes a postgresql ↵Santiago Pastorino2010-06-091-2/+2
| | | | | | 8.4 failing test Signed-off-by: José Valim <jose.valim@gmail.com>
* Fix multiple self-referencing eager loads failing to join multiple timesErnie Miller2010-06-081-1/+9
| | | | | | [#4679 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Fix eager loading of associations causing table name collisionsErnie Miller2010-04-281-0/+9
| | | | | | [#4463 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Added eager loading support to Relation and ActiveRecord#all.Emilio Tagua2009-10-051-1/+1
|
* Association preloading no longer stops if it hits a nil object [#1630 ↵Pivotal Labs2008-12-261-0/+8
| | | | | | state:resolved] Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com>
* Fixed STI type condition for eager loading of associationsTarmo Tänav2008-08-161-0/+12
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Added missing fixtures for tests which fail to run independently if run ↵Tarmo Tänav2008-08-041-1/+1
| | | | | | after schema reset Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Merge the has_finder gem, renamed as 'named_scope'. Closes #11404 [nkallen]Rick Olson2008-03-241-4/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9084 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Merge branch 'ar-test-cleanup' of git://git.geeksomnia.com/railsJeremy Kemper2008-01-211-3/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Move tests to casesJeremy Kemper2008-01-181-0/+110
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8660 5ecf4fe2-1ee6-0310-87b1-e25e094e27de