I used this solution as well recently. You can get around the restriction by
wrapping the columns that are not null and defaut with NULLIF in the view,
SELECT NULLIF(<not null column with default>, <value that doesn't appear in
You can ofcourse create a CHECK constraint on the column to prevent the
value you use in NULLIF from actually appearing in the column. This solution
also works with identity columns.
You might actually not have to use triggers on the views, depending on the
client applications/data access method you use. Some access methods actually