These callbacks will already have been defined when the association was
built. The check against `reflection.autosave` happens at call time, not
at define time, so simply modifying the reflection is sufficient.
Fixes#18704
Allows you to specify the model association key in a belongs_to
relationship instead of the foreign key.
The following queries are now equivalent:
Post.where(:author_id => Author.first)
Post.where(:author => Author.first)
PriceEstimate.where(:estimate_of_type => 'Treasure', :estimate_of_id => treasure)
PriceEstimate.where(:estimate_of => treasure)