search for: problem_column

Displaying 1 result from an estimated 1 matches for "problem_column".

2006 Feb 01
4
exclude a column in save!
...hat this column peeks the value from the sequence, I do this: obj = Mymodel.new obj.some_column1 = blah obj.some_column2 = blah obj.some_column3 = blah obj.save! but when looking at the logs, this creates a sql statement like this: INSERT INTO Mymodels (some_column1, some_column2, some_column3, problem_column) VALUES (blah, blah, blah, NULL); this is a problem, because it''s passing NULL and it''s not calling the default value... the only solution I see here is to create a trigger for insertion, that when the value is NULL set it to the next value from the sequence... what''s...