Skip to content

Commit d99e18c

Browse files
committed
Let's here it for our view support :)
1 parent ce3ba8f commit d99e18c

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

lib/active_record/connection_adapters/sqlserver_adapter.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ def supports_transaction_isolation?
107107
true
108108
end
109109

110+
def supports_views?
111+
true
112+
end
113+
110114
def disable_referential_integrity
111115
do_execute "EXEC sp_MSforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL'"
112116
yield

test/cases/coerced_tests.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,16 @@ def test_not_eq_with_array_parameter_coerced
617617

618618

619619

620+
class ViewWithPrimaryKeyTest < ActiveRecord::TestCase
621+
622+
# We do better than ActiveRecord and find the views PK.
623+
coerce_tests! :test_does_not_assume_id_column_as_primary_key
624+
625+
end
626+
627+
628+
629+
620630
require 'models/author'
621631
class YamlSerializationTest < ActiveRecord::TestCase
622632

0 commit comments

Comments
 (0)