I have a `SingleSelectQuestion` model which `embeds_many :select_options`. In Mongoid 6.4.4, I can do this query to get me the first select option embedded within a `SingleSelectQuestion` that is active. Active is a Ruby method, defined as "status == :active".
Here's the query:
There is only ever one "active" select option here. Due to how our database is constructed (the use of embeds many), I feel like this is the best way to do this query.
The thing I want to talk about today is that `only("select_options.$")` syntax.
When I run this code using the latest `mongodb/mongoid` master commit from today (currently b598df2dd78d), this query returns:
I think the behaviour of `only` has regressed / changed here, as it appears the syntax of "select_options.$" is NOT including all the fields as it has done in the past.
Has something changed here? Is this a bug? Or is this an incorrect use of mongoid?