app/models/hierarchy/relator.rb
# NOTE: since we've built all relationships to and from this hierarchy, we
# can delete both from the DB:
since we've built all relationships to and from this hierarchy, we
can delete both from the DB.
since we ' ve built all relationships to and from this hierarchy we can delete both from the DB .
def delete_existing_relationships
      EOL.log_call
      @hierarchy.hierarchy_entry_ids.in_groups_of(6400, false) do |ids|
        HierarchyEntryRelationship.where(hierarchy_entry_id_1: ids).delete_all
        HierarchyEntryRelationship.where(hierarchy_entry_id_2: ids).delete_all
      end
    end
def delete_existing_relationships EOL . log_call @hierarchy . hierarchy_entry_ids . in_groups_of ( 6400 , false ) do | ids | HierarchyEntryRelationship . where ( hierarchy_entry_id_1 : ids ) . delete_all HierarchyEntryRelationship . where ( hierarchy_entry_id_2 : ids ) . delete_all end end
NOTE: since we've built all relationships to and from this hierarchy, we
can delete both from the DB:
NOTE : since we ' ve built all relationships to and from this hierarchy we can delete both from the DB :