-
Notifications
You must be signed in to change notification settings - Fork 90
Open
Description
class Animal < ApplicationRecord
self.ignored_columns = [:name]
end
class Dog < Animal
self.ignored_columns = []
end
def test_sti_ignored_columns_not_match
animal = Animal.create(name: "Dog", type: "Dog")
animal.expire_second_level_cache
Animal.find(animal.id)
assert_equal "Dog", Animal.fetch_by_uniq_keys(id: animal.id).name
end
------------------------------------------------------------------------------------------------------------------------------
bundle exec rake test result:
Failure:
FetchByUinqKeyTest#test_sti_ignored_columns_not_match [/Code/second_level_cache/test/fetch_by_uniq_key_test.rb:119]:
Expected: "Dog"
Actual: nilMetadata
Metadata
Assignees
Labels
No labels