igorkasyanchuk / rails_db

Rails Database Viewer and SQL Query Runner
https://www.railsjazz.com/
MIT License
1.46k stars 111 forks source link

STI custom inheritance_column not taken into account #49

Closed dlupu closed 7 years ago

dlupu commented 8 years ago

I've just came across this error when trying to access a database that uses the STI mechanism.

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

We're already using .inheritance_column= in our model, so I guess the rails_db does not take into account that.

WDYT?

igorkasyanchuk commented 8 years ago

@dlupu please post your schema, or try to create branch with error and we may try to fix it together

igorkasyanchuk commented 7 years ago

try now with latest version