aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/personal_legacy_thing.rb
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2014-09-06 20:06:40 +0900
committerAkira Matsuda <ronnie@dio.jp>2014-09-06 23:28:18 +0900
commitda2f61947db287b5ba0343905da9316eecfd43f3 (patch)
tree8697e52bdff9fe718c9529c162cc7dd05cf97011 /activerecord/test/models/personal_legacy_thing.rb
parente11914b55110e8376e43476668ed8d5323b8dcba (diff)
downloadrails-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.rb4
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