Jamis Buck
2a35baa0bb
Wrap :conditions in parentheses to prevent problems with OR's #1871
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2324 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-24 23:58:13 +00:00
Nicholas Seckar
251a5d4508
Fix eager loading error messages, allow :include to specify tables using strings or symbols. Closes #2222
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2258 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-18 20:41:44 +00:00
David Heinemeier Hansson
6baedb0936
Make all tests pass on PGSQL #1759 [Rick Olson]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1844 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-17 09:17:50 +00:00
David Heinemeier Hansson
5b9b904f14
Added support for limit and offset with eager loading of has_one and belongs_to associations. Using the options with has_many and has_and_belongs_to_many associations will now raise an ActiveRecord::ConfigurationError #1692 [Rick Olsen]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1811 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-11 06:09:08 +00:00
Jeremy Kemper
5495b14a09
r2979@asus: jeremy | 2005-07-10 01:51:00 -0700
...
Split association reflection test into has_many and has_one tests. TODO: extend to belongs_to and habtm as well. Kill trailing whitespace.
r2980@asus: jeremy | 2005-07-10 01:53:41 -0700
Test that eager load of firm.account (a has_one) returns the correct account. This doesn't cover the regression in Ticket #1688 , however. Need a case where class name is not provided and the singular name is over-singularized by active_record.class_name. Kill trailing whitespace.
r2981@asus: jeremy | 2005-07-10 01:56:44 -0700
Fix class name resolution in AssociationReflection#name_to_class_name. Use the equivalent of the idiomatic ||= (read or write if nil) for the class_inheritable_attribute reflection arrays. Kill trailing whitespace.
r2982@asus: jeremy | 2005-07-10 01:59:08 -0700
Remove superfluous assignment in compute_type. In an inject, the return value is used for the next injection, so assigning to the injected value is unnecessary.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1790 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-10 04:22:08 +00:00
David Heinemeier Hansson
14762fd229
better error message for missing associations #1631 [courtenay]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1787 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-09 17:14:14 +00:00
David Heinemeier Hansson
ab416b4dde
Make postgres8 ar tests work #1601 [Tobias Luetke]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1668 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-04 17:16:18 +00:00
David Heinemeier Hansson
d9d22c7596
Fixed that single-table inheritance sub-classes couldn't be used to limit the result set with eager loading #1215 [Chris McGrath]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1619 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-03 08:21:22 +00:00
Jeremy Kemper
68b19ea7f3
Don't expect fixtures to be returned in the order they were inserted.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1402 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-11 20:56:12 +00:00
Jamis Buck
7f9ffb2ebf
Eager loading of dependent has_one associations won't delete the association #1212 . Also, starting to refactor the tests to make them speedier, with optional support for transactional fixtures.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1398 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-10 13:54:58 +00:00
David Heinemeier Hansson
6f34400086
Fixed order of loading in eager associations
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1229 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-19 16:32:57 +00:00
David Heinemeier Hansson
cdf88b7b04
Fixed stray comma when using eager loading and ordering together from has_many associations #1143
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1220 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-19 05:24:50 +00:00
David Heinemeier Hansson
1a6954af01
Changed habtm eager loading to also use joins
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1201 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-18 05:55:20 +00:00
David Heinemeier Hansson
76690111d5
Fixes for postgresql testing #1129 , #1130 , #1131
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1199 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-18 05:03:56 +00:00
David Heinemeier Hansson
75b8ac80d9
Dont initialize the association proxy for nil records
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1165 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-14 07:49:13 +00:00
David Heinemeier Hansson
057cf4918b
Added support for has_and_belongs_to_many associations in eager loading #1064 [Dan Peterson]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1132 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-10 17:24:56 +00:00
David Heinemeier Hansson
fdd268138a
Made eager loading work with inheritance hierarchies #1065 [Ryan Carver]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1131 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-10 15:49:49 +00:00
David Heinemeier Hansson
f8783abf0c
Made eager loading work even more
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1083 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-03 17:50:11 +00:00