# Since only one table is loaded at a time, conditions or orders cannot reference tables
# other than the main one. If this is the case Active Record falls back to the previously
# used LEFT OUTER JOIN based strategy.
# ...
# You must disambiguate column references for this fallback to happen, for example
# <tt>order: "author.name DESC"</tt> will work but <tt>order: "name DESC"</tt> will not.

You should either use order("orders.id DESC") or pass a lambda as the second argument of your has_many statement:

has_many :orders, -> { order(id::desc) }

As the first workaround (i.e. with order) doesn't work with 4-0-stable, I will leave it as open until we know whether the resolving commit hasn't been backported intentionally.