Displaying 1 result from an estimated 1 matches for "df_blah".
Did you mean:
_blah
2006 Aug 09
0
ActiveRecord provides unnecessary default value (SQL Server)
...new
obj.little_date
What I observe is that if there is no constraint on the little_date
column, then the value of obj.little_date is nil (as you would expect).
However, if there is a default constraint on little_date, created by
something like:
"ALTER TABLE XXX WITH NOCHECK ADD CONSTRAINT DF_blah DEFAULT (getdate())
FOR little_date"
and I then do:
obj.new
obj.little_date
then little_date has a value of "Sat Jan 01 00:00:00 Central Standard
Time 2000"
What gives? Is ActiveRecord attempting to create a default for this
record since "it saw" a default constrain...