Practical Problem: Thing.group("things.id, other_things.id").having("other_things.id = 1"). includes(:other_things).count vs Thing.group("things.id, other_things.id").having("other_things.id = 1"). includes(:other_things).limit(1) Easy way to reproduce it: Thing.select("b").group("things.id").having("other_things.id = 1").includes(:other_things).limit(1) SELECT DISTINCT things.id FROM thingsLEFT O
gem 'activerecord', '4.0.0' require 'active_record' require 'minitest/autorun' require 'logger' ActiveRecord::Base.logger = Logger.new(STDOUT) ActiveRecord::Base.establish_connection( :adapter => 'postgresql', :database => 'x' ) ActiveRecord::Schema.define do create_table :blogs, :force => true do |t| end create_table :posts, :force => true do |t| t.integer :blog_id end end class Blog < ActiveReco
In Rails 3.x, the disable_dependency_loading config option was available for controlling whether autoloading was enabled as a fallback in case eager loading fails. This option has been removed from Rails in this commit e6747d8. The behaviour was changed so that autoload is disabled entirely when eager loading is enabled. This seems to make sense to me. However, in a8bf129, the initializer which di
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く