File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 22
33#### Fixed
44
5- - [ #1262 ] ( https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/1262 ) Fix distinct alias when multiple databases used
5+ - [ #1262 ] ( https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/1262 ) Fix distinct alias when multiple databases used.
66
77## v8.0.0
88
99#### Changed
1010
11- - [ #1216 ] ( https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/1216 ) Refactor adapter interface to match abstract adapter
12- - [ #1225 ] ( https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/1225 ) Drop support to Ruby 3.1
11+ - [ #1216 ] ( https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/1216 ) Refactor adapter interface to match abstract adapter.
12+ - [ #1225 ] ( https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/1225 ) Drop support to Ruby 3.1.
1313
1414#### Fixed
1515
16- - [ #1215 ] ( https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/1215 ) Fix mismatched foreign key errors
16+ - [ #1215 ] ( https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/1215 ) Fix mismatched foreign key errors.
1717
1818Please check [ 7-2-stable] ( https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/blob/7-2-stable/CHANGELOG.md ) for previous changes.
Original file line number Diff line number Diff line change @@ -616,4 +616,13 @@ def setup
616616 assert_equal Task . where ( "starting < ?" , DateTime . current ) . count , 1
617617 end
618618 end
619+
620+ describe "distinct select query" do
621+ it "generated SQL does not contain unnecessary alias projection" do
622+ sqls = capture_sql do
623+ Post . includes ( :comments ) . joins ( :comments ) . first
624+ end
625+ assert_no_match ( /AS alias_0/ , sqls . first )
626+ end
627+ end
619628end
You can’t perform that action at this time.
0 commit comments