Commit 03beb7a
Changed files (3)
lib
lib/humble/database_table.rb
@@ -32,10 +32,6 @@ module Humble
end
end
- def destroy(connection, entity)
- @primary_key.destroy(connection[@name], entity)
- end
-
def column_for(key)
@columns.find { |x| x.matches?(key) }
end
lib/humble/mapping_configuration.rb
@@ -17,8 +17,8 @@ module Humble
end
end
- def delete_using(connection, entity)
- @table.destroy(connection, entity)
+ def delete_using(session, entity)
+ primary_key.destroy(session.create_connection[@table.name], entity)
end
def matches?(item)
lib/humble/session.rb
@@ -26,7 +26,7 @@ module Humble
end
def delete(entity)
- mapping_for(entity).delete_using(create_connection, entity)
+ mapping_for(entity).delete_using(self, entity)
end
def dispose