This project is archived and is in readonly mode.

#6177 new
Greg Hazel

The single-table inheritance mechanism failed to locate the subclass

Reported by Greg Hazel | December 16th, 2010 @ 03:23 AM

Running with config.threadsafe! and mysql2 on Rails 2.3.10 I got this:

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

However the type column is being used properly, both classes exist in the correct files, and this action works 99.99% of the time. Once though, I saw this failure (I've been running with config.threadsafe! for about a day and mysql2 a few hours, otherwise the app has been running for a Long Time).

Is ActiveRecord::Base#compute_type (and/or the rest of the inheritance system) really threadsafe?

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket