Fixed bug: Cache invalidation race condition in concurrent threads cause access to newly added ObjectManager attributes to fail.

This commit is contained in:
Thorsten Eckel 2017-08-18 16:01:49 +02:00
parent b26bdb7261
commit 1985a6af52

View file

@ -720,6 +720,9 @@ to send no browser reload event, pass false
def self.reset_database_info(model) def self.reset_database_info(model)
model.connection.schema_cache.clear! model.connection.schema_cache.clear!
model.reset_column_information model.reset_column_information
# rebuild columns cache to reduce the risk of
# race conditions in re-setting it with outdated data
model.columns
end end
def check_name def check_name