diff options
author | Akira Matsuda <ronnie@dio.jp> | 2014-09-06 20:06:40 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2014-09-06 23:28:18 +0900 |
commit | da2f61947db287b5ba0343905da9316eecfd43f3 (patch) | |
tree | 8697e52bdff9fe718c9529c162cc7dd05cf97011 /activerecord/test/models/personal_legacy_thing.rb | |
parent | e11914b55110e8376e43476668ed8d5323b8dcba (diff) | |
download | rails-da2f61947db287b5ba0343905da9316eecfd43f3.tar.gz rails-da2f61947db287b5ba0343905da9316eecfd43f3.tar.bz2 rails-da2f61947db287b5ba0343905da9316eecfd43f3.zip |
Dynamically modified schema and association would not be correctly reset
This fixes <"SQLite3::SQLException: no such column: legacy_things.person_id: SELECT \"legacy_things\".* FROM \"legacy_things\" WHERE \"legacy_things\".\"person_id\" = ?">
in OptimisticLockingTest#test_lock_destroy
Diffstat (limited to 'activerecord/test/models/personal_legacy_thing.rb')
-rw-r--r-- | activerecord/test/models/personal_legacy_thing.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/models/personal_legacy_thing.rb b/activerecord/test/models/personal_legacy_thing.rb new file mode 100644 index 0000000000..a7ee3a0bca --- /dev/null +++ b/activerecord/test/models/personal_legacy_thing.rb @@ -0,0 +1,4 @@ +class PersonalLegacyThing < ActiveRecord::Base + self.locking_column = :version + belongs_to :person, :counter_cache => true +end |