lib/neo4j/active_node/labels.rb in neo4j-7.0.4 vs lib/neo4j/active_node/labels.rb in neo4j-7.0.5

- old
+ new

@@ -103,10 +103,10 @@ find_by(values) || fail(RecordNotFound, "#{self.query_as(:n).where(n: values).limit(1).to_cypher} returned no results") end # Deletes all nodes and connected relationships from Cypher. def delete_all - self.neo4j_session._query("MATCH (n:`#{mapped_label_name}`) OPTIONAL MATCH n-[r]-() DELETE n,r") + self.neo4j_session._query("MATCH (n:`#{mapped_label_name}`) OPTIONAL MATCH (n)-[r]-() DELETE n,r") self.neo4j_session._query("MATCH (n:`#{mapped_label_name}`) DELETE n") end # Returns each node to Ruby and calls `destroy`. Be careful, as this can be a very slow operation if you have many nodes. It will generate at least # one database query per node in the database, more if callbacks require them.