aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/association_preload.rb
Commit message (Collapse)AuthorAgeFilesLines
* Rewrote AssociationPreload.Jon Leighton2011-02-281-433/+0
|
* Split AssociationProxy into an Association class (and subclasses) which ↵Jon Leighton2011-02-181-11/+11
| | | | manages the association, and a CollectionProxy class which is *only* a proxy. Singular associations no longer have a proxy. See CHANGELOG for more.
* Add interpolation of association conditions back in, in the form of proc { ↵Jon Leighton2011-02-141-2/+10
| | | | ... } rather than instance_eval-ing strings
* Rename AssociationProxy#loaded to loaded! as it mutates the associationJon Leighton2011-01-301-3/+3
|
* we have a method for setting preloaded records, so use itAaron Patterson2011-01-181-6/+2
|
* reduce objects, reduce loops and function calls while building the conditionalAaron Patterson2011-01-181-4/+2
|
* keys will always be strings in the id => record mapAaron Patterson2011-01-181-1/+1
|
* reduce method calls and loops when dealing with custom conditionsAaron Patterson2011-01-181-4/+3
|
* ony bother with record map keys when we need themAaron Patterson2011-01-181-9/+9
|
* refactor elaborate group_by in to a normal group_byAaron Patterson2011-01-181-8/+3
|
* lazily instantiate AR objects in order to avoid NoMethodErrorsAaron Patterson2011-01-111-8/+14
|
* Get rid of set_association_target and association_loaded? as the parts of ↵Jon Leighton2011-01-111-6/+13
| | | | the code that need that can now just use association_proxy(:name).loaded?/target=
* avoid splatting arrays by using concatAaron Patterson2011-01-111-3/+3
|
* only use one array when collecting split up queriesAaron Patterson2011-01-101-1/+1
|
* When preloading a belongs_to, the target should still be set (to nil) if ↵Jon Leighton2011-01-031-9/+14
| | | | 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.
* Have a proper AssociationReflection#foreign_type method rather than using ↵Jon Leighton2011-01-031-7/+4
| | | | options[:foreign_type]
* Rename AssociationReflection#primary_key_name to foreign_key, since the ↵Jon Leighton2010-12-311-11/+11
| | | | options key which it relates to is :foreign_key
* try not to make so many funcallsAaron Patterson2010-12-261-3/+6
|
* make our hash of klasses and ids actually have classes for keysAaron Patterson2010-12-261-8/+6
|
* Refactor we_can_set_the_inverse_on_this? to use a less bizarre name amongst ↵Jon Leighton2010-12-261-3/+2
| | | | other things
* refactor to use group_byAaron Patterson2010-12-251-3/+3
|
* arel will deal with casting the ids, so we can delete thisAaron Patterson2010-12-251-13/+1
|
* use arel to determine selection columnAaron Patterson2010-12-251-2/+1
|
* refactoring method selectionAaron Patterson2010-12-251-10/+5
|
* using arel to compile sql statementsAaron Patterson2010-12-251-8/+17
|
* use sql literal factory methodAaron Patterson2010-12-251-1/+1
|
* take more advantage of arel sql compilerAaron Patterson2010-12-251-12/+20
|
* refactoring AST buildingAaron Patterson2010-12-251-5/+3
|
* use arel to compile SQL statementsAaron Patterson2010-12-251-6/+15
|
* avoid duping and new objectsAaron Patterson2010-12-231-2/+3
|
* probably should use the some_ids variable here. o_OAaron Patterson2010-12-221-1/+1
|
* removing SQL interpolation, please use scoping and attribute conditionals as ↵Aaron Patterson2010-12-221-6/+1
| | | | a replacement
* use arel to compile SQL rather than build stringsAaron Patterson2010-12-221-1/+8
|
* build an AST rather than build SQL stringsAaron Patterson2010-12-221-1/+10
|
* Fix problem with duplicated records when a :uniq :through association is ↵Jon Leighton2010-12-151-0/+1
| | | | preloaded [#2447 state:resolved]
* Removed ids_in_list_limit in favor of in_clause_length defined in ↵Alex Rothenberg2010-11-231-2/+2
| | | | 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-5/+21
| | | | | (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
* Convert :primary_key in association to a string before comparing to column ↵Denis Odorcic2010-10-301-1/+1
| | | | names, so that for example :primary_key => :another_pk works as well [#5605 state:resolved]
* refactor to remove `through_records`Aaron Patterson2010-10-231-10/+7
|
* removing dead codeAaron Patterson2010-10-231-2/+0
|
* Revert "porting 066518295032a8e3f3468737337b8c8299442867 to master. Thanks ↵Aaron Patterson2010-09-281-1/+1
| | | | | | Marcelo Giorgi" This reverts commit 9eca11a4a564f44675cca951216e917b8f610eab.
* porting 066518295032a8e3f3468737337b8c8299442867 to master. Thanks Marcelo ↵Aaron Patterson2010-09-281-1/+1
| | | | Giorgi
* Prevent shadowing outer local variable.Emilio Tagua2010-09-271-3/+3
|
* remove more codesAaron Patterson2010-09-211-6/+4
|
* deleting more codeAaron Patterson2010-09-211-4/+1
|
* use each properly to avoid splatting a variableAaron Patterson2010-09-211-2/+1
|
* deleting repeated codesAaron Patterson2010-09-211-13/+10
|
* we should mark sql strings as sql literalsAaron Patterson2010-08-231-1/+1
|
* removing unused codeAaron Patterson2010-08-221-3/+1
|