Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | When preloading has_and_belongs_to_many associations, we should only ↵ | Jon Leighton | 2011-03-04 | 1 | -0/+16 |
| | | | | instantiate one AR object per actual record in the database. (Even when IM is off.) | ||||
* | Rewrote AssociationPreload. | Jon Leighton | 2011-02-28 | 1 | -15/+14 |
| | |||||
* | Run tests without IdentityMap when IM=false is given. | Emilio Tagua | 2011-02-15 | 1 | -7/+7 |
| | |||||
* | Merge remote branch 'rails/master' into identity_map | Emilio Tagua | 2011-02-15 | 1 | -8/+48 |
|\ | | | | | | | | | | | | | | | | | | | | | | | Conflicts: activerecord/examples/performance.rb activerecord/lib/active_record/association_preload.rb activerecord/lib/active_record/associations.rb activerecord/lib/active_record/associations/association_proxy.rb activerecord/lib/active_record/autosave_association.rb activerecord/lib/active_record/base.rb activerecord/lib/active_record/nested_attributes.rb activerecord/test/cases/relations_test.rb | ||||
| * | Add interpolation of association conditions back in, in the form of proc { ↵ | Jon Leighton | 2011-02-14 | 1 | -0/+8 |
| | | | | | | | | ... } rather than instance_eval-ing strings | ||||
| * | the connection pool caches table_exists? calls | Aaron Patterson | 2011-02-07 | 1 | -0/+2 |
| | | |||||
| * | When preloading a belongs_to, the target should still be set (to nil) if ↵ | Jon Leighton | 2011-01-03 | 1 | -0/+9 |
| | | | | | | | | there is no foreign key present. And the loaded flag should be set on the association proxy. This then allows us to remove the foreign_key_present? check from BelongsToAssociation#find_target. Also added a test for the same thing on polymorphic associations. | ||||
| * | Allow assignment on has_one :through where the owner is a new record [#5137 ↵ | Jon Leighton | 2011-01-03 | 1 | -3/+17 |
| | | | | | | | | | | | | | | | | | | | | state:resolved] This required changing the code to keep the association proxy for a belongs_to around, despite its target being nil. Which in turn required various changes to the way that stale target checking is handled, in order to support various edge cases (loaded target is nil then foreign key added, foreign key is changed and then changed back, etc). A side effect is that the code is nicer and more succinct. Note that I am removing test_no_unexpected_aliasing since that is basically checking that the proxy for a belongs_to *does* change, which is the exact opposite of the intention of this commit. Also adding various tests for various edge cases and related things. Phew, long commit message! | ||||
| * | Some basic tests for the :foreign_type option on belongs_to, which was ↵ | Jon Leighton | 2011-01-03 | 1 | -1/+12 |
| | | | | | | | | previously completely untested. | ||||
| * | Fix dodgy tests which were effectively asserting nil == nil | Jon Leighton | 2010-12-26 | 1 | -3/+3 |
| | | |||||
| * | removing SQL interpolation, please use scoping and attribute conditionals as ↵ | Aaron Patterson | 2010-12-22 | 1 | -4/+0 |
| | | | | | | | | a replacement | ||||
* | | Merge remote branch 'rails/master' into identity_map | Emilio Tagua | 2010-12-20 | 1 | -9/+29 |
|\| | | | | | | | | | | | | | | | Conflicts: activerecord/lib/active_record/associations/association_proxy.rb activerecord/lib/active_record/autosave_association.rb activerecord/lib/active_record/base.rb activerecord/lib/active_record/persistence.rb | ||||
| * | Fix problem with duplicated records when a :uniq :through association is ↵ | Jon Leighton | 2010-12-15 | 1 | -1/+8 |
| | | | | | | | | preloaded [#2447 state:resolved] | ||||
| * | test for eager load of has_one association with condition on the through table | Pivotal Labs | 2010-12-16 | 1 | -1/+9 |
| | | |||||
| * | preheating cache so that tests can run in isolation | Aaron Patterson | 2010-12-09 | 1 | -0/+5 |
| | | |||||
| * | Removed ids_in_list_limit in favor of in_clause_length defined in ↵ | Alex Rothenberg | 2010-11-23 | 1 | -7/+7 |
| | | | | | | | | database_limits.rb | ||||
* | | Fix number of queries performed in tests. | Emilio Tagua | 2010-11-19 | 1 | -6/+6 |
| | | |||||
* | | Revert "IdentityMap - Adjustments to test cases" | Emilio Tagua | 2010-11-19 | 1 | -6/+2 |
| | | | | | | | | | | | | | | | | This reverts commit 4db9dca55e3acc2c59f252eb83ecb83db5f4b81b. Conflicts: activerecord/test/cases/identity_map_test.rb | ||||
* | | IdentityMap - Adjustments to test cases | Marcin Raczkowski | 2010-11-19 | 1 | -2/+6 |
|/ | |||||
* | removing space errors | Aaron Patterson | 2010-11-18 | 1 | -1/+1 |
| | |||||
* | Adapters can specify maximum number of ids they support in a list of expressions | Alex Rothenberg | 2010-11-18 | 1 | -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 | ||||
* | fisting a bunch of unused variable warnings | Aaron Patterson | 2010-11-15 | 1 | -6/+6 |
| | |||||
* | Fixes queries using limits and punctuation in order, removes order("col1, ↵ | Santiago Pastorino | 2010-11-05 | 1 | -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 Leighton | 2010-10-13 | 1 | -4/+4 |
| | | | | was previously untested | ||||
* | Revert "porting 515917f5d8678af6c57842ca5dfd7c18e67ff1fe to master" | Aaron Patterson | 2010-09-28 | 1 | -6/+0 |
| | | | | This reverts commit bee447a5b9fe1d683c6cc69aefb7fc22c2a9d9af. | ||||
* | porting 515917f5d8678af6c57842ca5dfd7c18e67ff1fe to master | Aaron Patterson | 2010-09-28 | 1 | -0/+6 |
| | |||||
* | Eager loading :through associations will join the :source model if there are ↵ | Grant Ammons | 2010-07-08 | 1 | -0/+6 |
| | | | | | | :conditions. [#2362 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Use better assertion methods for testing | Neeraj Singh | 2010-05-19 | 1 | -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 anything | Pratik Naik | 2010-03-31 | 1 | -0/+6 |
| | |||||
* | cleaning up a bunch of parse time warnings in AR [#4186 state:resolved] | Aaron Patterson | 2010-03-15 | 1 | -1/+1 |
| | | | | Signed-off-by: wycats <wycats@gmail.com> | ||||
* | Don't publicize with_scope for tests since it may shadow public misuse | Jeremy Kemper | 2009-12-28 | 1 | -4/+4 |
| | |||||
* | Add Model.from and association_collection#from finder methods | Pratik Naik | 2009-12-28 | 1 | -8/+1 |
| | |||||
* | Use finder options as relation method names to provide more familiar | Emilio Tagua | 2009-08-18 | 1 | -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 Simanovskis | 2009-08-06 | 1 | -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 sqlite | Chad Woolley | 2009-05-21 | 1 | -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 Floering | 2009-05-18 | 1 | -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 Crumley | 2009-05-10 | 1 | -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 Kemper | 2009-03-08 | 1 | -4/+4 |
| | | | | [#1617 state:resolved] | ||||
* | Fix :include of has_one with :primary_key option | Frederick Cheung | 2008-12-26 | 1 | -0/+16 |
| | |||||
* | Fix :include of has_many associations with :primary_key option | Frederick Cheung | 2008-12-26 | 1 | -0/+17 |
| | |||||
* | Preload uses exclusive scope [#643 state:resolved] | Frederick Cheung | 2008-12-26 | 1 | -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 randomly | Frederick Cheung | 2008-12-21 | 1 | -2/+2 |
| | |||||
* | Ensure :include checks joins when determining if it can preload [#528 ↵ | Frederick Cheung | 2008-12-18 | 1 | -0/+65 |
| | | | | state:resolved] | ||||
* | Fix preloading of belongs_to with null foreign key generating useless query ↵ | Frederick Cheung | 2008-12-18 | 1 | -1/+2 |
| | | | | [#1027 state:resolved] | ||||
* | Ensure hash conditions on referenced tables are considered when eager ↵ | Paul | 2008-11-26 | 1 | -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 Collins | 2008-11-19 | 1 | -1/+1 |
| | | | | | | expected behavior. Signed-off-by: Michael Koziarski <michael@koziarski.com> | ||||
* | explicitly including child associations that are also included in the parent ↵ | Will Bryant | 2008-10-10 | 1 | -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 Dennis | 2008-10-04 | 1 | -0/+9 |
| | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | wrote a test showing eager loading's misbehavior (sanitizing against the ↵ | Will Bryant | 2008-09-29 | 1 | -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 test | Tarmo Tänav | 2008-08-26 | 1 | -3/+3 |
| | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> |