Defining polymorphic type condition

As great as Rails 2.1 is, I for the life of me cannot figure out why
polymorphic associations do not support reconfiguring the type column

For example, I have no way to do a polymorphic association using a
lookup hash which maps an integer to a class name.

Storing a TINYINT unsigned is waaaaay more efficient than storing a
string like “SomeActiveRecordModel” over and over again.

Looking in the association proxy classes for has_one and has_many, I

  def construct_sql
    when @reflection.options[:as]
      @finder_sql =

= #{@owner.quoted_id} AND " +
= #{@owner.class.quote_value(}”
@finder_sql =
“#{@reflection.quoted_table_name}.#{@reflection.primary_key_name} =
@finder_sql << " AND (#{conditions})" if conditions

This cannot easily be changed. The type condition should be a function
call so we could easily modified. Has anybody thought about this?

Or better yet, any solutions/patches?