"bitsweat" made AR/Oracle cry... http://dev.rubyonrails.org/changeset/5887 ------------------------------------------------------------------------ r5887 | bitsweat | 2007-01-11 21:14:55 -0800 (Thu, 11 Jan 2007) | 1 line PostgreSQL: use a subselect to correctly perform eager finds with :limit and :order. Closes #4668. ------------------------------------------------------------------------ U activerecord/test/associations/eager_test.rb U activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb U activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb U activerecord/lib/active_record/associations.rb U activerecord/CHANGELOG Updated to revision 5887. 1) Failure: test_limited_eager_with_multiple_order_columns(EagerAssociationTest) [./test/associations/eager_test.rb:301]: <[#<StiPost:0x45dc3e8c @attributes {"body"=>"hello", "title"=>"sti me", "taggings_count"=>0, "type"=>"StiPost", "id"=>5, "author_id"=>1}>, #<Post:0x45dd6f8c @attributes {"body"=>"hello", "title"=>"sti comments", "taggings_count"=>0, "type"=>"Post", "id"=>4, "author_id"=>1}>]> expected but was <[#<SpecialPost:0x45dbec70 @attributes {"body"=>"Like I hopefully always am", "title"=>"So I was thinking", "taggings_count"=>0, "type"=>"SpecialPost", "id"=>2, "author_id"=>1}, @author #<Author:0x45dbe7c0 @attributes={"name"=>"David", "id"=>1, "author_address_id"=>nil}, @post_log=[]>, @comments [#<SpecialComment:0x45dbe374 @attributes={"body"=>"Don''t think too hard", "type"=>"SpecialComment", "post_id"=>2, "id"=>3}>]>, #<Post:0x45dbdf64 @attributes {"body"=>"hello", "title"=>"sti comments", "taggings_count"=>0, "type"=>"Post", "id"=>4, "author_id"=>1}, @author #<Author:0x45db7268 @attributes={"name"=>"David", "id"=>1, "author_address_id"=>nil}, @post_log=[]>, @comments [#<SpecialComment:0x45dbd848 @attributes={"body"=>"Special type 2", "type"=>"SpecialComment", "post_id"=>4, "id"=>7}>, #<Comment:0x45db8258 @attributes={"body"=>"Normal type", "type"=>"Comment", "post_id"=>4, "id"=>8}>, #<VerySpecialComment:0x45db795c @attributes={"body"=>"Very Special type", "type"=>"VerySpecialComment", "post_id"=>4, "id"=>5}>, #<SpecialComment:0x45db6e6c @attributes={"body"=>"Special type", "type"=>"SpecialComment", "post_id"=>4, "id"=>6}>]>]>. 2) Failure: test_limited_eager_with_order(EagerAssociationTest) [./test/associations/eager_test.rb:295]: <[#<SpecialPost:0x404bd024 @attributes {"body"=>"Like I hopefully always am", "title"=>"So I was thinking", "taggings_count"=>0, "type"=>"SpecialPost", "id"=>2, "author_id"=>1}>, #<Post:0x404bb5bc @attributes {"body"=>"hello", "title"=>"sti comments", "taggings_count"=>0, "type"=>"Post", "id"=>4, "author_id"=>1}>]> expected but was <[#<Post:0x404a5410 @attributes {"body"=>"hello", "title"=>"sti comments", "taggings_count"=>0, "type"=>"Post", "id"=>4, "author_id"=>1}, @author #<Author:0x40493cb0 @attributes={"name"=>"David", "id"=>1, "author_address_id"=>nil}, @post_log=[]>, @comments [#<SpecialComment:0x404a04b0 @attributes={"body"=>"Special type", "type"=>"SpecialComment", "post_id"=>4, "id"=>6}>, #<SpecialComment:0x4049b76c @attributes={"body"=>"Special type 2", "type"=>"SpecialComment", "post_id"=>4, "id"=>7}>, #<Comment:0x40494a5c @attributes={"body"=>"Normal type", "type"=>"Comment", "post_id"=>4, "id"=>8}>, #<VerySpecialComment:0x4049135c @attributes={"body"=>"Very Special type", "type"=>"VerySpecialComment", "post_id"=>4, "id"=>5}>]>, #<SpecialPost:0x4048e74c @attributes {"body"=>"Like I hopefully always am", "title"=>"So I was thinking", "taggings_count"=>0, "type"=>"SpecialPost", "id"=>2, "author_id"=>1}, @author #<Author:0x4048dfcc @attributes={"name"=>"David", "id"=>1, "author_address_id"=>nil}, @post_log=[]>, @comments [#<SpecialComment:0x4048d608 @attributes={"body"=>"Don''t think too hard", "type"=>"SpecialComment", "post_id"=>2, "id"=>3}>]>]>. 1018 tests, 3908 assertions, 2 failures, 0 errors rake aborted! Command failed with status (1): [/usr/pkg/ruby184/bin/ruby -Ilib:test:test/...] (See full trace by running task with --trace) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Michael A. Schoen
2007-Jan-13 07:17 UTC
PATCH FOR Re: Rails AR/Oracle Unit Test: [5887] failed
Michael Schoen wrote:> "bitsweat" made AR/Oracle cry... > > http://dev.rubyonrails.org/changeset/5887 > ------------------------------------------------------------------------ > r5887 | bitsweat | 2007-01-11 21:14:55 -0800 (Thu, 11 Jan 2007) | 1 line > > PostgreSQL: use a subselect to correctly perform eager finds with :limit and :order. Closes #4668. > ------------------------------------------------------------------------Same issue fixed for Oracle in: http://dev.rubyonrails.org/ticket/7021 Can this, and [7000] please be applied, and for 1.2 as well? thanks, Michael --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---