TinyTds issue with columns that have default values

12 views
Skip to first unread message

Kenneth Ortmann

unread,
Oct 15, 2015, 9:10:18 AM10/15/15
to Rails SQLServer Adapter
With my active record objects, the database tables have default values. 

Normally the way active record works, it will do a describe or what not on the table and active record stores these values magically for when objects are created.

Validations like presence_of are ignored unless the attribute is explicitly set before creation.

I've traced down all the way to where the sql server adapter gives the query to TinyTds that gives back all of the columns on the table.

If I take the query and run it on SQLServer, the columns come back correctly. The TinyTds result set has nil for the default value on all columns. 
TinyTds version 0.7.0
activerecord-sqlserver-adapter 4.0.0
Reply all
Reply to author
Forward
0 new messages