[Rails] Legacy Single Table Inheritance - Specify Discriminator?
I have a legacy database that was designed to work with Hibernate. I
have the following class hierachry:
class Status < ActiveRecord::Base
class ItemStatus < Status
set_inheritance_column :item_type
class MediaItemStatus < Status
set_inheritance_column :item_type
My issue is that the discriminator used in Hibernate was the string
literal "MEDIA" for a MediaItemStatus and "ITEM" for an ItemStatus. I'm
new to rails and I'm not finding a way to specify what AR should expect
for actual discriminator values. Is this possible in Rails 2.3?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home