diff options
author | Yasuo Honda <yasuo.honda@gmail.com> | 2014-07-12 05:42:49 +0900 |
---|---|---|
committer | Yasuo Honda <yasuo.honda@gmail.com> | 2014-07-14 21:54:17 +0900 |
commit | fc4680425817a5fcfbaba970201fecee7cb8491d (patch) | |
tree | b6f9e4c62abbb37d4b70b29e30e209a089fb2901 /activerecord/test/models | |
parent | defc68004d2a8d3d66d5f4893e34ba9917d97e83 (diff) | |
download | rails-fc4680425817a5fcfbaba970201fecee7cb8491d.tar.gz rails-fc4680425817a5fcfbaba970201fecee7cb8491d.tar.bz2 rails-fc4680425817a5fcfbaba970201fecee7cb8491d.zip |
Address ORA-00972: identifier is too long when tested with Oracle
by using shorter attribute names.
Diffstat (limited to 'activerecord/test/models')
-rw-r--r-- | activerecord/test/models/face.rb | 3 | ||||
-rw-r--r-- | activerecord/test/models/man.rb | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/test/models/face.rb b/activerecord/test/models/face.rb index 3d7f0626e2..91e46f83e5 100644 --- a/activerecord/test/models/face.rb +++ b/activerecord/test/models/face.rb @@ -1,7 +1,8 @@ class Face < ActiveRecord::Base belongs_to :man, :inverse_of => :face belongs_to :polymorphic_man, :polymorphic => true, :inverse_of => :polymorphic_face - belongs_to :polymorphic_man_without_inverse, :polymorphic => true + # Oracle identifier lengh is limited to 30 bytes or less, `polymorphic` renamed `poly` + belongs_to :poly_man_without_inverse, :polymorphic => true # These is a "broken" inverse_of for the purposes of testing belongs_to :horrible_man, :class_name => 'Man', :inverse_of => :horrible_face belongs_to :horrible_polymorphic_man, :polymorphic => true, :inverse_of => :horrible_polymorphic_face diff --git a/activerecord/test/models/man.rb b/activerecord/test/models/man.rb index a26491ce61..4fbb6b226b 100644 --- a/activerecord/test/models/man.rb +++ b/activerecord/test/models/man.rb @@ -1,7 +1,7 @@ class Man < ActiveRecord::Base has_one :face, :inverse_of => :man has_one :polymorphic_face, :class_name => 'Face', :as => :polymorphic_man, :inverse_of => :polymorphic_man - has_one :polymorphic_face_without_inverse, :class_name => 'Face', :as => :polymorphic_man_without_inverse + has_one :polymorphic_face_without_inverse, :class_name => 'Face', :as => :poly_man_without_inverse has_many :interests, :inverse_of => :man has_many :polymorphic_interests, :class_name => 'Interest', :as => :polymorphic_man, :inverse_of => :polymorphic_man # These are "broken" inverse_of associations for the purposes of testing |