Saturday, October 2, 2010

[Rails] Re: Legacy Single Table Inheritance - Specify Discriminator?

On Oct 2, 2:57 am, Steve Shapero <li...@ruby-forum.com> wrote:
>
> 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?

You could try overriding Status.compute_type

Fred
> --
> Posted viahttp://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


Real Estate