mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
a50eacb03c
Since 213796f
, bind params are used for IN clause if enabled prepared
statements.
Unfortunately, most adapter modules have a limitation for # of bind
params (mysql2 65535, pg 65535, sqlite3 250000). So if eager loading
large number of records at once, that query couldn't be sent to the
database.
Since eager loading/preloading queries are auto-generated by Active
Record itself, so it should be worked regardless of large number of
records like as before.
Fixes #33702.
6 lines
164 B
Ruby
6 lines
164 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Citation < ActiveRecord::Base
|
|
belongs_to :reference_of, class_name: "Book", foreign_key: :book2_id
|
|
has_many :citations
|
|
end
|