collectiveidea/awesome_nested_set

Oracle 12 incompatibility - can't use limit and lock in same query

Closed this issue · 1 comments

awesome_nested_set is not currently compatible with Oracle 12, as various places will trigger: ArgumentError: Combination of limit and lock is not supported.
See: rails/arel#430

The three places I've found that are triggering this in awesome_nested_set are:

  1. right_most_node.lock!, in right_most_bound: https://github.com/collectiveidea/awesome_nested_set/blob/master/lib/awesome_nested_set/model.rb#L194
  2. :lock => true, in reload_nested_set: https://github.com/collectiveidea/awesome_nested_set/blob/master/lib/awesome_nested_set/model.rb#L259
  3. nested_set_scope.right_of(left).select(primary_id).lock(true), in destroy_descendants: https://github.com/collectiveidea/awesome_nested_set/blob/master/lib/awesome_nested_set/model/prunable.rb#L23

I was able to work around the last one by adding my own before_destroy to my model that handles child cleanup then sets self.skip_before_destroy = true, but the others probably require more effort if locking is to be preserved.

I know that Oracle is a hard/inaccessible platform to test on, but hopefully this will help others who run into this problem get on the right track.

stale commented

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.