def with_descendant(*descendants)
        descendant_ids = descendants.map { |ea| ea.is_a?(ActiveRecord::Base) ? ea._ct_id : ea }
        scope = descendant_ids.blank? ? all : joins(:descendant_hierarchies).
          where("#{_ct.hierarchy_table_name}.descendant_id" => descendant_ids).
          where("#{_ct.hierarchy_table_name}.generations > 0").