Thursday, January 19, 2006

The single-table inheritance mechanism failed to locate the subclass

Today I was working on creating my first Ruby on Rails application when I ran into this error:

The single-table inheritance mechanism failed to locate the subclass:
'Community Blog'. 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 Site.inheritance_column to use another column for that information.



Apparently the reason for the error is specified within the error. The error is being caused because one of my columns in the table was named type. Now I had two options, either to rename the column or to "overwrite Site.inheritance_column to use another column for that information"

You can guess what I did. That's right, I simply renamed my column.

Frank

1 Comments:

At 6:49 AM, Blogger arivarasan said...

is that the reason for the error is 'type' is reserved for some other purpose?

 

Post a Comment

<< Home

eXTReMe Tracker