aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/relations_test.rb
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | Merge branch 'master' into nested_has_many_throughJon Leighton2010-10-281-7/+9
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/association_preload.rb activerecord/lib/active_record/associations.rb activerecord/test/schema/schema.rb
| * | | | | | | Add explicit ordering in relations_test.rb, as the lack of this was causing ↵Jon Leighton2010-10-191-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | failures against postgres
| * | | | | | | Properly support conditions on any of the reflections involved in a nested ↵Jon Leighton2010-10-191-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | through association
| * | | | | | | Merge branch 'master' into nested_has_many_throughJon Leighton2010-10-141-6/+0
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: activerecord/lib/active_record/associations.rb activerecord/test/cases/associations/cascaded_eager_loading_test.rb
| * | | | | | | | Fix the tests (I have actually verified that these are also the 'right' ↵Jon Leighton2010-10-031-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fixes, rather than just making the tests pass again)
* | | | | | | | | Change behavior of count(:limit => x, :offset => y) to limit/offset before ↵John Mileham2011-03-031-0/+28
| |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | counting.
* | | | | | | | Merge remote branch 'rails/master' into identity_mapEmilio Tagua2011-02-181-3/+37
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: activerecord/lib/active_record/associations/association.rb activerecord/lib/active_record/fixtures.rb
| * | | | | | | | explicitly allowing lolqueriesAaron Patterson2011-02-161-3/+10
| | | | | | | | |
| * | | | | | | | fixing whitespace problemsAaron Patterson2011-02-161-3/+3
| | | | | | | | |
| * | | | | | | | removed an unnecessary second query when passing an ActiveRecord::Relation ↵Steven Fenigstein2011-02-161-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to a where clause. And added ability to use subselects in where clauses.
* | | | | | | | | Fix expected queries in relation tests.Emilio Tagua2011-02-151-2/+2
| | | | | | | | |
* | | | | | | | | Run tests without IdentityMap when IM=false is given.Emilio Tagua2011-02-151-5/+5
| | | | | | | | |
* | | | | | | | | Merge remote branch 'rails/master' into identity_mapEmilio Tagua2011-02-151-9/+31
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | | | | | Remove Relation#& alias for Relation#mergeErnie Miller2011-02-121-7/+7
| | | | | | | | |
| * | | | | | | | ActiveRecord::Relation#primary_key should return a string, just like ↵Jon Leighton2011-01-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ActiveRecord::Base.primary_key does.
| * | | | | | | | Let AssociationCollection#find use #scoped to do its finding. Note that I am ↵Jon Leighton2011-01-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | removing test_polymorphic_has_many_going_through_join_model_with_disabled_include, since this specifies different behaviour for an association than for a regular scope. It seems reasonable to expect scopes and association proxies to behave in roughly the same way rather than having subtle differences.
| * | | | | | | | Fix test_any in relations_test.rb, which was failing when relations_test.rb ↵Jon Leighton2011-01-031-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is run on its own (it passes when the entire suite is run). This is a hacky fix for a problem I didn't quite get to the bottom of, so I'd welcome a better solution...
| * | | | | | | | Added one more failing test for bug #6036Robert Pankowecki (Gavdi)2011-01-041-0/+6
| | | | | | | | |
* | | | | | | | | Merge remote branch 'rails/master' into identity_mapEmilio Tagua2010-12-201-4/+15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | | | | | ActiveRecord::Base.joins should allow single nil argument [#6181 state:resolved]Piotr Sarnacki2010-12-161-0/+4
| | | | | | | | |
| * | | | | | | | Replace rudimentary named_scope with scope. [#6052 state:resolved]Pavel Gorbokon2010-12-151-3/+3
| | |_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * rename method names (actually in tests) * rename instance variable @_named_scopes_cache to @_scopes_cache * rename references in doc comments * don't touch CHANGELOG :)
| * | | | | | | Do not send id for quoting twice if the primary key is string.Neeraj Singh2010-11-231-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [#6022 state:resolved]
* | | | | | | | Update number of queries executed instead of avoiding IM.Emilio Tagua2010-11-191-9/+5
| | | | | | | |
* | | | | | | | IdentityMap - Tests for IMMarcin Raczkowski2010-11-191-0/+6
|/ / / / / / /
* | | | | | | testing multiple ORd queriesAaron Patterson2010-11-181-0/+12
| | | | | | |
* | | | | | | When use where more than once on the same column, relation doesn't do an ↵Santiago Pastorino2010-11-171-0/+9
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | 'or' or 'in' with the values
* | | | | | support finding by a ruby class [#5979 state:resolved]Aaron Patterson2010-11-151-0/+7
| | | | | |
* | | | | | adding more test coverage around finding with active record objectsAaron Patterson2010-11-151-0/+12
| | | | | |
* | | | | | use quoted id of single AR::Base objects in predicatesAaron Patterson2010-11-151-0/+6
| | | | | |
* | | | | | use persisted? instead of new_record? wherever possibleDavid Chelimsky2010-11-091-5/+5
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - persisted? is the API defined in ActiveModel - makes it easier for extension libraries to conform to ActiveModel APIs without concern for whether the extended object is specifically ActiveRecord [#5927 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* | | | | use column names as order by complex function parameters, fix for postgresql ↵Raimonds Simanovskis2010-11-071-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adapter to correctly remove ASC/DESC Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* | | | | Fixes queries using limits and punctuation in order, removes order("col1, ↵Santiago Pastorino2010-11-051-1/+22
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | col2") usage in favor of order(["col1", "col2"}) [#4597 state:committed]
* | | | adding tests for #5234 and #5184. Tests were from Akira Matsuda. Thanks Akira!Aaron Patterson2010-10-301-0/+5
| |_|/ |/| |
* | | adding bind_values to relationsAaron Patterson2010-10-261-0/+9
| | |
* | | removing call to deprecated API, this test is outside AR responsibilitiesAaron Patterson2010-10-221-7/+0
| |/ |/|
* | reorder removed in favor of except(:order).orderSantiago Pastorino2010-10-111-6/+0
|/
* @klass also uses DynamicFinderMatch, so no need for it on the relationAaron Patterson2010-09-271-0/+5
|
* expanding the test to include both type of order declarationNeeraj Singh2010-09-181-6/+22
| | | | | | | | | while declaring default_scope Also added test for unscoped using block style with four different combinations Signed-off-by: José Valim <jose.valim@gmail.com>
* removing nonsensical tests, limit now actually adds a limitAaron Patterson2010-09-151-4/+0
|
* added a test for relation which checks intersection between a relation and ↵kane2010-09-101-0/+6
| | | | | | an array works in both directions Signed-off-by: Mikel Lindsaar <raasdnil@gmail.com>
* Add tests for Relation#only.Emilio Tagua2010-09-091-0/+11
|
* select should raise error when no block or no parameter is passedAaron Patterson2010-09-071-0/+4
|
* order should always be concatenated.Neeraj Singh2010-09-051-0/+18
| | | | | | | | | | | | | | | | | | | | | | order that is declared first has highest priority in all cases. Here are some examples. Car.order('name desc').find(:first, :order => 'id').name Car.named_scope_with_order.named_scope_with_another_order Car.order('id DESC').scoping do Car.find(:first, :order => 'id asc') end No special treatment to with_scope or scoping. Also note that if default_scope declares an order then the order declared in default_scope has the highest priority unless with_exclusive_scope is used. Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Fix test: this should return 0 not 7, since Arel was ignoring select clause ↵Emilio Tagua2010-09-011-1/+1
| | | | | | and now it's fixed. Signed-off-by: José Valim <jose.valim@gmail.com>
* code gardening: we have assert_(nil|blank|present), more concise, with ↵Xavier Noria2010-08-171-2/+2
| | | | better default failure messages - let's use them
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-2/+2
| | | | 's/[ \t]*$//' -i {} \;)
* Ensure we can nest include calls [#5285 state:resolved]Neeraj Singh2010-08-121-1/+11
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* test to ensure that respond_to? delegates to arelAaron Patterson2010-08-061-0/+19
|
* sorry AR, my privates are none of your businessAaron Patterson2010-08-061-7/+0
|
* reverting where() functionality, adding a testAaron Patterson2010-07-301-0/+5
|