Closed bli closed 2 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
For those who have the same issue, to avoid this issue, instead of using the default configuration, you can explicitly specify the order column like this below:
acts_as_nested_set order_column: :lft
Let's say
Answer
is anActiveRecord
withacts_as_nested_set
, try this in console:Note that the generated ORDER BY clause is not referencing the table name "answers"
In 3.4.0 and before, it did include the table name so that there won't be ambiguity when there are multiple tables with the same column in the query.
This is the line that is causing the issue: https://github.com/collectiveidea/awesome_nested_set/blob/7387a479ee9b82b390191e1336da150d0063d305/lib/awesome_nested_set/model.rb#L101
That seems to be introduced in this PR: https://github.com/collectiveidea/awesome_nested_set/pull/451/files/fa99eee57e2c8e380ed71e1d2324b0993ad809b8#diff-ff6b9b918954b07e491e706e57072b078caa30cc7e439587ed31a5c147183eb0