Displaying 1 result from an estimated 1 matches for "insert_blank".
2007 Aug 12
0
ActiveRecord with only a primary key
...the other hand interprets NULL a bit differently,
it does not fill the column with a default value when NULL is
used so the result is a not-null constraint violation. Postgresql
only works with:
INSERT INTO table VALUES(DEFAULT);
INSERT INTO table (id) VALUES(DEFAULT);
So I think that either an insert_blank method needs to be added
to the database adapters which is used when a row needs to be
created but there are no actual attributes, or the insert method
needs a condition to cover this edge case.
I''d like to implement this, but I''d first like to know which
approach (if any) I shou...