lib/cassandra_object/associations.rb in sessionm-cassandra_object-2.5.0 vs lib/cassandra_object/associations.rb in sessionm-cassandra_object-2.5.1

- old
+ new

@@ -37,10 +37,12 @@ end def remove(key) begin ActiveSupport::Notifications.instrument("remove.cassandra_object", column_family: relationships_column_family, key: key) do - connection.remove(relationships_column_family, key.to_s, consistency: thrift_write_consistency) + CassandraObject::Base.with_connection do + connection.remove(relationships_column_family, key.to_s, consistency: thrift_write_consistency) + end end rescue Cassandra::AccessError => e raise e unless e.message =~ /Invalid column family/ end super