J
jm
A question for the rails users out there.
Rails error:
....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 Record.inheritance_column to use another column for that
information.
I fixed this by adding
def self.inheritance_column
"rails_type"
end
to the model class which may not be the correct fix, but at least it
let me work on it a bit more. Anyway, the row name "type"
clashes/conflicts with the ruby method of the same name. Is there a way
to change the row mappings so that db column type maps to/from
Record.rectype or something similar?
And, before you say change the row name I didn't pick the database
schema and it's used by another program which has this compiled in.
thanks,
J.
Rails error:
....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 Record.inheritance_column to use another column for that
information.
I fixed this by adding
def self.inheritance_column
"rails_type"
end
to the model class which may not be the correct fix, but at least it
let me work on it a bit more. Anyway, the row name "type"
clashes/conflicts with the ruby method of the same name. Is there a way
to change the row mappings so that db column type maps to/from
Record.rectype or something similar?
And, before you say change the row name I didn't pick the database
schema and it's used by another program which has this compiled in.
thanks,
J.