mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Do not add record to identity map if the record doesn't have values for all the columns, so we don't get 'MissingAttributeError' later when trying to access other fields of the same record.
This commit is contained in:
@@ -90,7 +90,7 @@ module ActiveRecord
|
||||
end
|
||||
|
||||
def add(record)
|
||||
repository[record.class.symbolized_sti_name][record.id] = record
|
||||
repository[record.class.symbolized_sti_name][record.id] = record if record.class.column_names - record.attribute_names == []
|
||||
end
|
||||
|
||||
def remove(record)
|
||||
|
||||
Reference in New Issue
Block a user