|Subject:||read only columns (computed columns)|
Sybase ASE supports "computed columns". They are like other columns, but - they don't have a datatype - they don't can't be nullable or non-nullable - they have an SQL expression which defines the value - they can be fixed (computed once) or dynamic (computed on each access) Two samples: - A fixed computed column with expression "GETDATE()" stores the creation date of the row - A special column is called "timestamp" - it holds a stamp (some kind of alltime never-reset commit-counter) of the row's last insert/update Here is a much more explanation:server-computed-column-calculated-column-sample.aspx DBIx::Class tries to insert rows as INSERT INTO table(col1,col2,col3) VALUES(DEFAULT,DEFAULT,DEFAULT) but computed columns must not be part of any INSERT or UPDATE command - the SQL server reports an error if you try. (They can be used as WHERE arguments to UPDATE, of cause.) add_columns should accept something like "read_only => 1" to include this column when fetching from the DB (SELECT) and might be included in UPDATE commands, if required, but must not be a written column in INSERT or UPDATE.