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 2
2
3
3
#### Fixed
4
4
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.
6
6
7
7
## v8.0.0
8
8
9
9
#### Changed
10
10
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.
13
13
14
14
#### Fixed
15
15
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.
17
17
18
18
Please 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
616
616
assert_equal Task . where ( "starting < ?" , DateTime . current ) . count , 1
617
617
end
618
618
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
619
628
end
You can’t perform that action at this time.
0 commit comments