aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/eager_test.rb
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Fix number of queries performed in tests.Emilio Tagua2010-11-191-6/+6
| | |
| * | Revert "IdentityMap - Adjustments to test cases"Emilio Tagua2010-11-191-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4db9dca55e3acc2c59f252eb83ecb83db5f4b81b. Conflicts: activerecord/test/cases/identity_map_test.rb
| * | IdentityMap - Adjustments to test casesMarcin Raczkowski2010-11-191-2/+6
| | |
* | | Merge branch 'master' into nested_has_many_throughJon Leighton2010-12-121-0/+5
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/associations/class_methods/join_dependency.rb activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb activerecord/lib/active_record/associations/has_many_through_association.rb
| * | preheating cache so that tests can run in isolationAaron Patterson2010-12-091-0/+5
| | |
* | | Merge branch 'master' into nested_has_many_throughJon Leighton2010-11-271-0/+52
|\| | | | | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/associations.rb
| * | Removed ids_in_list_limit in favor of in_clause_length defined in ↵Alex Rothenberg2010-11-231-7/+7
| |/ | | | | | | database_limits.rb
| * removing space errorsAaron Patterson2010-11-181-1/+1
| |
| * Adapters can specify maximum number of ids they support in a list of expressionsAlex Rothenberg2010-11-181-0/+52
| | | | | | | | | | (default is nil meaning unlimited but Oracle imposes a limit of 1000) Limit is used to make multiple queries when preloading associated has_many or habtm records
* | Merge branch 'master' into nested_has_many_throughJon Leighton2010-11-171-6/+6
|\| | | | | | | | | | | Conflicts: activerecord/lib/active_record/associations/has_many_through_association.rb activerecord/test/cases/associations/has_many_through_associations_test.rb
| * fisting a bunch of unused variable warningsAaron Patterson2010-11-151-6/+6
| |
* | Merge branch 'master' into nested_has_many_throughJon Leighton2010-11-081-2/+2
|\| | | | | | | | | Conflicts: activerecord/lib/active_record/associations.rb
| * Fixes queries using limits and punctuation in order, removes order("col1, ↵Santiago Pastorino2010-11-051-2/+2
| | | | | | | | | | | | col2") usage in favor of order(["col1", "col2"}) [#4597 state:committed]
| * Add some tests for functionality in JoinAssociation which already exists but ↵Jon Leighton2010-10-131-4/+4
| | | | | | | | was previously untested
| * Revert "porting 515917f5d8678af6c57842ca5dfd7c18e67ff1fe to master"Aaron Patterson2010-09-281-6/+0
| | | | | | | | This reverts commit bee447a5b9fe1d683c6cc69aefb7fc22c2a9d9af.
| * porting 515917f5d8678af6c57842ca5dfd7c18e67ff1fe to masterAaron Patterson2010-09-281-0/+6
| |
* | Properly support conditions on any of the reflections involved in a nested ↵Jon Leighton2010-10-191-2/+2
| | | | | | | | 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-2/+2
|/ | | | fixes, rather than just making the tests pass again)
* Eager loading :through associations will join the :source model if there are ↵Grant Ammons2010-07-081-0/+6
| | | | | | :conditions. [#2362 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Use better assertion methods for testingNeeraj Singh2010-05-191-1/+1
| | | | | | [#4645 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Dont try to load the record from the db if preloading didn't find anythingPratik Naik2010-03-311-0/+6
|
* cleaning up a bunch of parse time warnings in AR [#4186 state:resolved]Aaron Patterson2010-03-151-1/+1
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Don't publicize with_scope for tests since it may shadow public misuseJeremy Kemper2009-12-281-4/+4
|
* Add Model.from and association_collection#from finder methodsPratik Naik2009-12-281-8/+1
|
* Use finder options as relation method names to provide more familiarEmilio Tagua2009-08-181-5/+5
| | | | | naming. Use bang methods convention in methods that alter the relation.
* added :order option to find :first methods and associations as otherwise ↵Raimonds Simanovskis2009-08-061-1/+6
| | | | | | | | Oracle tests were failing Oracle stores '' string as NULL Oracle cannot have identifiers larger than 30 characters added missing fixtures to test setup method
* Fix eager association test related to different ordering on sqliteChad Woolley2009-05-211-1/+1
| | | | | | [#2686 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Fixed limited eager loading associations with numbers in the name [#2668 ↵Benjamin Floering2009-05-181-0/+4
| | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Fixed eager load error on find with include => [:table_name] and hash ↵Anthony Crumley2009-05-101-0/+12
| | | | | | conditions like {:table_name => {:column => 'value'}} Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Ruby 1.9 compat: rename deprecated assert_raises to assert_raise.Jeremy Kemper2009-03-081-4/+4
| | | | [#1617 state:resolved]
* Fix :include of has_one with :primary_key optionFrederick Cheung2008-12-261-0/+16
|
* Fix :include of has_many associations with :primary_key optionFrederick Cheung2008-12-261-0/+17
|
* Preload uses exclusive scope [#643 state:resolved]Frederick Cheung2008-12-261-0/+15
| | | | | | | | | With self referential associations, the scope for the the top level should not affect fetching of associations, for example when doing Person.male.find :all, :include => :friends we should load all of the friends for each male, not just the male friends.
* Use explicit order to stop test failing randomlyFrederick Cheung2008-12-211-2/+2
|
* Ensure :include checks joins when determining if it can preload [#528 ↵Frederick Cheung2008-12-181-0/+65
| | | | state:resolved]
* Fix preloading of belongs_to with null foreign key generating useless query ↵Frederick Cheung2008-12-181-1/+2
| | | | [#1027 state:resolved]
* Ensure hash conditions on referenced tables are considered when eager ↵Paul2008-11-261-2/+18
| | | | | | loading with limit/offset. [#1404 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Remove SQL Server cases from tests for latest adapter work to pass rails ↵Ken Collins2008-11-191-1/+1
| | | | | | expected behavior. Signed-off-by: Michael Koziarski <michael@koziarski.com>
* explicitly including child associations that are also included in the parent ↵Will Bryant2008-10-101-1/+41
| | | | | | | association definition should not result in double records in the collection/double loads (#1110) Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1110 state:committed]
* Fix has_many :through when the source is a belongs_to association. [#323 ↵Zach Dennis2008-10-041-0/+9
| | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* wrote a test showing eager loading's misbehavior (sanitizing against the ↵Will Bryant2008-09-291-0/+7
| | | | | | wrong table) when the association has a :conditions hash Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Fix yet another implicit order dependant testTarmo Tänav2008-08-261-3/+3
| | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Load the first and not the last has_one result when doing join-based eager ↵Tarmo Tänav2008-08-251-0/+6
| | | | | | | | | | | loading This matters when the has_one is defined with an order in which case there is an expectation that the first one will be loaded. [#904 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Don't interpret decimals as table names in ↵Peter Wagenet2008-08-211-0/+7
| | | | | | ActiveRecord::Associations::ClassMethods#references_eager_loaded_tables? [#532 state:resolved] 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>
* Fix conditions and order on join tables with limited eager loading. [#372 ↵Tiago Macedo2008-06-081-1/+12
| | | | state:resolved]
* When preloading group by reflection rather than by class [#125 state:resolved]Frederick Cheung2008-05-111-0/+6
| | | | | | | | This avoids extra queries when several subclasses inherit the association from their parent class, while still coping with subclasses redefining associations. Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Ensure hm:t preloading honours reflection options. [#137 state:resolved]Frederick Cheung2008-05-111-0/+11
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Ensure correct record is returned when preloading has_one where more than ↵Frederick Cheung2008-05-061-0/+4
| | | | | | | one row exists Signed-off-by: Michael Koziarski <michael@koziarski.com> [#73 state:closed]