From 1e9e198cc5c053a9137de78d524412105ac20065 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 6 Mar 2007 09:33:08 +0000 Subject: Note that find results may not be in the same order as the id arguments. Closes #7719. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6347 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/base.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 2127f64a1b..3a9783bac5 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -386,6 +386,10 @@ module ActiveRecord #:nodoc: # Person.find([1]) # returns an array for objects the object with ID = 1 # Person.find(1, :conditions => "administrator = 1", :order => "created_on DESC") # + # Note that returned records may not be in the same order as the ids you + # provide since database rows are unordered. Give an explicit :order + # to ensure the results are sorted. + # # Examples for find first: # Person.find(:first) # returns the first object fetched by SELECT * FROM people # Person.find(:first, :conditions => [ "user_name = ?", user_name]) -- cgit v1.2.3