mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add CHANGELOG entry for #40106 [ci skip]
This commit is contained in:
parent
af42091416
commit
7b9ca16394
1 changed files with 14 additions and 0 deletions
|
@ -1,3 +1,17 @@
|
|||
* Allow `where` references association names as joined table name aliases.
|
||||
|
||||
```ruby
|
||||
class Comment < ActiveRecord::Base
|
||||
enum label: [:default, :child]
|
||||
has_many :children, class_name: "Comment", foreign_key: :parent_id
|
||||
end
|
||||
|
||||
# ... FROM comments LEFT OUTER JOIN comments children ON ... WHERE children.label = 1
|
||||
Comment.includes(:children).where("children.label": "child")
|
||||
```
|
||||
|
||||
*Ryuta Kamizono*
|
||||
|
||||
* Support storing demodulized class name for polymorphic type.
|
||||
|
||||
Before Rails 6.1, storing demodulized class name is supported only for STI type
|
||||
|
|
Loading…
Reference in a new issue