Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | | | | | | | | | | | | | | | | | Set IdentityMap disabled by default. | Emilio Tagua | 2010-11-19 | 1 | -1/+1 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | We don't need to dup key, since only value is weak. | Emilio Tagua | 2010-11-19 | 1 | -10/+3 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Refactor associations cache removal from IM. (ht: Aaron Patterson) | Emilio Tagua | 2010-11-19 | 1 | -4/+4 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Update number of queries executed instead of avoiding IM. | Emilio Tagua | 2010-11-19 | 1 | -9/+5 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Don't change tests, fix code: if locking is enabled skip IM. | Emilio Tagua | 2010-11-19 | 2 | -14/+1 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Remove associated objects from IM when clearing them from association cache. | Emilio Tagua | 2010-11-19 | 1 | -0/+6 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Test setup method should clean up IM. | Emilio Tagua | 2010-11-19 | 1 | -0/+4 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Query objects if readonly_value is false, skip them only if nil. | Emilio Tagua | 2010-11-19 | 1 | -3/+3 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Added method to IM to remove objects by class and id. Then used it to remove ↵ | Emilio Tagua | 2010-11-19 | 2 | -0/+6 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | objects when updating counters. | |||||
* | | | | | | | | | | | | | | | | | Clear IdentityMap before continue this test, we can do this here because ↵ | Emilio Tagua | 2010-11-19 | 1 | -0/+1 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | store_full_sti_class is not supposed to change during "runtime". | |||||
* | | | | | | | | | | | | | | | | | Call super setup in this test. | Emilio Tagua | 2010-11-19 | 1 | -1/+2 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Fix number of queries performed in tests. | Emilio Tagua | 2010-11-19 | 1 | -6/+6 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Ups, forgot to remove one conflict tag from previous commit. | Emilio Tagua | 2010-11-19 | 1 | -1/+0 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Revert "IdentityMap - Adjustments to test cases" | Emilio Tagua | 2010-11-19 | 7 | -35/+14 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4db9dca55e3acc2c59f252eb83ecb83db5f4b81b. Conflicts: activerecord/test/cases/identity_map_test.rb | |||||
* | | | | | | | | | | | | | | | | | Don't load IdentityMap middleware if not enabled. Simplify middleware. | Emilio Tagua | 2010-11-19 | 3 | -5/+13 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Don't wrap into identity map if it is disabled. | Emilio Tagua | 2010-11-19 | 1 | -3/+2 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Bring back "Reject attributes even if association is loaded" after rebasing ↵ | Emilio Tagua | 2010-11-19 | 1 | -3/+10 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to master. | |||||
* | | | | | | | | | | | | | | | | | Use block syntax in IdentityMap middleware. | Emilio Tagua | 2010-11-19 | 2 | -3/+16 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Change API name, we don't need any param. | Emilio Tagua | 2010-11-19 | 1 | -1/+1 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Use just one repository and keep it in the current thread. | Emilio Tagua | 2010-11-19 | 2 | -16/+6 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Flush IdentityMap when running tests. | Emilio Tagua | 2010-11-19 | 1 | -0/+4 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Use association_class method which returns the reflection class, this method ↵ | Emilio Tagua | 2010-11-19 | 1 | -2/+6 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is redefined in polymorphic belongs to associations. | |||||
* | | | | | | | | | | | | | | | | | Use IdentityMap middleware to flush map on each request. | Emilio Tagua | 2010-11-19 | 4 | -1/+18 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Add initial tests for WeakHash. | Emilio Tagua | 2010-11-19 | 1 | -0/+33 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Check if constant is defined in AR, if not this can cause errors when using ↵ | Emilio Tagua | 2010-11-19 | 1 | -1/+1 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | polymorphic associations. | |||||
* | | | | | | | | | | | | | | | | | Use conditional to avoid warnings. | Emilio Tagua | 2010-11-19 | 2 | -35/+36 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Weakling is only required for JRuby. | Emilio Tagua | 2010-11-19 | 2 | -3/+1 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Use ActiveSupport::WeakHash for MRI, JRuby prefers Weakling. | Emilio Tagua | 2010-11-19 | 2 | -1/+49 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Use hash[:Post][1] style identity maps for each table. | Emilio Tagua | 2010-11-19 | 4 | -9/+27 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | IdentityMap is enabled by default. | Emilio Tagua | 2010-11-19 | 1 | -2/+4 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Add docs to Identity Map. | Emilio Tagua | 2010-11-19 | 1 | -0/+13 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Added config syntax to enable/disable identity map: ↵ | Emilio Tagua | 2010-11-19 | 2 | -0/+2 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | config.active_record.identity_map = true | |||||
* | | | | | | | | | | | | | | | | | Fix test name and typo. | Emilio Tagua | 2010-11-19 | 1 | -2/+2 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Reeject attributes even if association is loaded | Marcin Raczkowski | 2010-11-19 | 1 | -1/+0 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Test reorganization | Marcin Raczkowski | 2010-11-19 | 2 | -39/+88 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Separated initialization | Marcin Raczkowski | 2010-11-19 | 2 | -24/+20 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Set Identity Map disabled by default. Enable it for testing. | Emilio Tagua | 2010-11-19 | 2 | -1/+4 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Test with target object, failing on 1.9.2 when comparing object against ↵ | Emilio Tagua | 2010-11-19 | 2 | -2/+3 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | association proxy object. | |||||
* | | | | | | | | | | | | | | | | | Testing objects equality is what we are looking for here, no query caching. | Emilio Tagua | 2010-11-19 | 1 | -12/+8 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Change test models. | Emilio Tagua | 2010-11-19 | 1 | -10/+10 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Use strings primary keys in identity map keys to avoid problems with casting ↵ | Emilio Tagua | 2010-11-19 | 1 | -3/+3 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and also allow strings primary keys. | |||||
* | | | | | | | | | | | | | | | | | implicit_readonly is not set until records are loaded, just check ↵ | Emilio Tagua | 2010-11-19 | 1 | -3/+2 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | readonly_value and then set readonly status. | |||||
* | | | | | | | | | | | | | | | | | Don't use identity map if loading readonly records, this will prevent ↵ | Emilio Tagua | 2010-11-19 | 2 | -8/+35 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | changing readonly status on already loaded records. | |||||
* | | | | | | | | | | | | | | | | | Add tests for inverse relations when using has many and identity map. | Emilio Tagua | 2010-11-19 | 1 | -0/+134 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Remove associated object from identity map when reloading. | Emilio Tagua | 2010-11-19 | 1 | -0/+1 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Associated objects are assigned from identity map if enabled and contains ↵ | Emilio Tagua | 2010-11-19 | 2 | -2/+23 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | associated object. | |||||
* | | | | | | | | | | | | | | | | | Add test for update_attributes and identity map. | Emilio Tagua | 2010-11-19 | 1 | -0/+13 | |
| | | | | | | | | | | | | | | | | | ||||||
* | | | | | | | | | | | | | | | | | Remove objects from identity map if save! failed, otherwise finding again ↵ | Emilio Tagua | 2010-11-19 | 2 | -0/+16 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the same record will have invalid attributes. | |||||
* | | | | | | | | | | | | | | | | | Remove objects from identity map if save failed, otherwise finding again the ↵ | Emilio Tagua | 2010-11-19 | 2 | -1/+17 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | same record will have invalid attributes. | |||||
* | | | | | | | | | | | | | | | | | Add test to show that when IdentityMap is disabled finders returns different ↵ | Emilio Tagua | 2010-11-19 | 1 | -4/+7 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | objects. |