aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/reflection.rb
Commit message (Collapse)AuthorAgeFilesLines
* Move the code which builds a scope for through associations into a generic ↵Jon Leighton2011-03-101-3/+3
| | | | AssociationScope class which is capable of building a scope for any association.
* Fix ↵Jon Leighton2011-03-071-1/+1
| | | | test_has_many_association_through_a_has_many_association_with_nonstandard_primary_keys
* Refactor ThroughAssociation#join_to to be much smaller, and independent of ↵Jon Leighton2011-03-061-0/+6
| | | | construct_owner_conditions.
* Push source_type and polymorphic conditions out of ThroughAssociation and ↵Jon Leighton2011-03-051-10/+11
| | | | JoinDependency::JoinAssociation and into the reflection instead.
* Add a test for STI on the through where the through is nested, and change ↵Jon Leighton2011-03-051-0/+3
| | | | the code which support this
* Merge branch 'master' into nested_has_many_throughJon Leighton2011-03-041-18/+65
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/association_preload.rb activerecord/lib/active_record/associations.rb 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_association.rb activerecord/lib/active_record/associations/has_many_through_association.rb activerecord/lib/active_record/associations/has_one_association.rb activerecord/lib/active_record/associations/has_one_through_association.rb activerecord/lib/active_record/associations/through_association_scope.rb activerecord/lib/active_record/reflection.rb activerecord/test/cases/associations/has_many_through_associations_test.rb activerecord/test/cases/associations/has_one_through_associations_test.rb activerecord/test/cases/reflection_test.rb activerecord/test/cases/relations_test.rb activerecord/test/fixtures/memberships.yml activerecord/test/models/categorization.rb activerecord/test/models/category.rb activerecord/test/models/member.rb activerecord/test/models/reference.rb activerecord/test/models/tagging.rb
| * Rewrote AssociationPreload.Jon Leighton2011-02-281-4/+6
| |
| * Delegate Association#options to the reflection, and replace ↵Jon Leighton2011-02-211-0/+8
| | | | | | | | 'reflection.options' with 'options'. Also add through_options and source_options methods for through associations.
| * Split AssociationProxy into an Association class (and subclasses) which ↵Jon Leighton2011-02-181-1/+1
| | | | | | | | manages the association, and a CollectionProxy class which is *only* a proxy. Singular associations no longer have a proxy. See CHANGELOG for more.
| * Ensure that association_ids uses the correct attribute where the association ↵Jon Leighton2011-02-181-0/+4
| | | | | | | | is a has_many :through with a :primary_key option on the source reflection. [#6376 state:resolved]
| * DRY up the code which instantiates the association proxyJon Leighton2011-01-111-0/+25
| |
| * Implement deprecated version of AssociationReflection#primary_key_name, ↵Jon Leighton2011-01-031-0/+6
| | | | | | | | which has been renamed to #foreign_key. Also bumping the deprecation_horizon in Active Support to 3.1.
| * Have a proper AssociationReflection#foreign_type method rather than using ↵Jon Leighton2011-01-031-0/+4
| | | | | | | | options[:foreign_type]
| * Rename AssociationReflection#primary_key_name to foreign_key, since the ↵Jon Leighton2010-12-311-7/+7
| | | | | | | | options key which it relates to is :foreign_key
| * Now we can drop-kick AssociationReflection#dependent_conditions into oblivion.Jon Leighton2010-12-311-11/+0
| |
| * Raise an error for associations which try to go :through a polymorphic ↵Jon Leighton2010-12-231-1/+5
| | | | | | | | association [#6212 state:resolved]
| * Improved strategy for updating a belongs_to association when the foreign key ↵Jon Leighton2010-12-231-1/+4
| | | | | | | | changes. Rather than resetting each affected association when the foreign key changes, we should lazily check for 'staleness' (where fk does not match target id) when the association is accessed.
| * Don't allow a has_one association to go :through a collection association ↵Jon Leighton2010-12-231-0/+4
| | | | | | | | [#2976 state:resolved]
| * Fix problem where wrong keys are used in JoinAssociation when an association ↵Jon Leighton2010-12-201-0/+4
| | | | | | | | goes :through a belongs_to [#2801 state:resolved]
| * Fix various issues with the :primary_key option in :through associations ↵Jon Leighton2010-12-151-1/+5
| | | | | | | | [#2421 state:resolved]
| * reduce method callsAaron Patterson2010-12-161-1/+1
| |
* | Merge branch 'master' into nested_has_many_throughJon Leighton2010-12-121-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | 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
| * | reduce method callsAaron Patterson2010-12-101-1/+1
| |/
* | Merge branch 'master' into nested_has_many_throughJon Leighton2010-11-271-11/+9
|\| | | | | | | | | | | Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/associations.rb
| * class inheritable attributes is used no more! all internal use of class ↵Josh Kalderimis2010-11-201-11/+9
| | | | | | | | | | | | inheritable has been changed to class_attribute. class inheritable attributes has been deprecated. Signed-off-by: José Valim <jose.valim@gmail.com>
* | Fix naughty trailing whitespaceJon Leighton2010-10-311-21/+21
| |
* | Merge branch 'master' into nested_has_many_throughJon Leighton2010-10-281-2/+2
|\| | | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/association_preload.rb activerecord/lib/active_record/associations.rb activerecord/test/schema/schema.rb
| * use grep instead of select + is_a?Aaron Patterson2010-10-201-2/+2
| |
* | Add some comments for ThroughReflection#through_reflection_chainJon Leighton2010-10-191-1/+10
| |
* | Remove various comments and code which were just being used during the ↵Jon Leighton2010-10-191-24/+0
| | | | | | | | development of nested through association support (OMFGZ, I might just have nearly finished this\!
* | Add explicit tests for the nested through association changes in reflection.rbJon Leighton2010-10-191-2/+13
| |
* | Bugfix/refactoringJon Leighton2010-10-191-0/+9
| |
* | Remove unused methodsJon Leighton2010-10-191-11/+0
| |
* | Support for :primary_key option on the source reflection of a through ↵Jon Leighton2010-10-191-0/+8
| | | | | | | | association, where the source is a has_one or has_many
* | Properly support conditions on any of the reflections involved in a nested ↵Jon Leighton2010-10-191-3/+50
| | | | | | | | through association
* | Make sure nested through associations are read onlyJon Leighton2010-10-151-0/+4
| |
* | Integrate nested support into ThroughAssociationScope, using my concept of ↵Jon Leighton2010-10-021-10/+40
| | | | | | | | generating a 'chain' of reflections to be joined. It seems to work at the moment, all existing tests are passing. There may be further complications as we add more test cases for nested associations, though.
* | Started implementing nested :through associations by using the existing ↵Jon Leighton2010-10-011-0/+15
| | | | | | | | structure of ThroughAssociationScope rather than layering a module over the top
* | Initial nested_has_many_through support [#1152]Bodaniel Jeanes2010-09-261-3/+3
|/
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-13/+13
| | | | 's/[ \t]*$//' -i {} \;)
* applied guidelines to "# =>"Paco Guzman2010-08-121-1/+1
|
* Tidy up previous commit.José Valim2010-08-021-14/+12
|
* returns not returned . fixing documentation for reflectionNeeraj Singh2010-07-301-28/+30
|
* bringing consistency in commentsNeeraj Singh2010-07-241-14/+17
|
* Adds basic description and title.Rizwan Reza2010-06-161-15/+30
|
* Fix a bunch of minor spelling mistakesEvgeniy Dolzhenko2010-06-111-4/+4
|
* Bring back +extra_conditions+. This effectively reverts ↵Carl Lerche2010-04-031-1/+2
| | | | 386b7bfd9d78a6d8c8bc7cc4a310df806ad0ba57
* Make the query built by has_many ...., :dependent => :____ lazy since all ↵Carl Lerche2010-04-021-0/+10
| | | | the information is not really available yet.
* cleaning up some test warningsAaron Patterson2010-03-141-3/+5
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Renamed AssociationReflection #collection_association? to #collection?.Eloy Duran2010-01-081-5/+5
|