I had a similar problem when I hooked my Wordpress installation into
my rails site.  On the wp_posts table they use ID as their primary
key.  Ruby/Rails was getting unhappy whenever I tried to access
obj.ID.   I was able to access this field by using obj.attributes
["ID"].

I don't know if this will work for you without a code example, but its
worth a shot.

On Jul 28, 10:58 am, Craig White <[email protected]> wrote:
> I have a problem with a table that has a field named 'type'
>
> When I try to use active record in a console, I get this error...
>
> ActiveRecord::SubclassNotFound: The single-table inheritance mechanism
> failed to locate the subclass: '10'. This error is raised because the
> column 'type' is reserved for storing the class in case of inheritance.
> Please rename this column if you didn't intend it to be used for storing
> the inheritance class or overwrite Debtortrans.inheritance_column to use
> another column for that information.
>
> Since I can't rename the column because the software creating it needs
> this, is it possible to alias the name somehow within rails, perhaps in
> the model?
>
> Craig
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to