I don't know about Oracle, but in Postgres it's never smart to rely on 'default' ordering because when a complex query is altered or Postgres version chages, the database may return same records in different order. So this trade-off -- surprising a few users (who didn't explicitly specified an order) for an ActiveRecord enhancement -- seems to me like a plus. Thumbs up
-M
On 7/2/06, Coda Hale <[EMAIL PROTECTED]> wrote:
The unintended consequences of this is that if someone adds an
:include option with an ordered association in a find without an
:order option, the first-order results will appear in a different
order:
Author.find (:all).map(&:id) != Author.find(:all, :include =>
[:posts]).map(&:id)
This is not particularly friendly behavior, but the buck for this can
be passed on to the SQL standard: if you want an order, specify an
order. Otherwise, don't expect anything.
_______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core