Reserved names with ActiveRecord models

前端 未结 4 2059
南旧
南旧 2020-12-05 12:58

I take naming pretty seriously, so I think pretty hard about good names for my ActiveRecord models. However, I frequently come up with a name and it has some conflict with a

4条回答
  •  一个人的身影
    2020-12-05 13:13

    Column name type is also reserved and does not show in the list of MyModel.methods!

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

    Does anyone have experience with names like category, class, transaction, group, etc.? All pop into mind when I'm categorising data within my db....

提交回复
热议问题