diff --git a/lib/acts_as_paranoid/validations.rb b/lib/acts_as_paranoid/validations.rb
index <HASH>..<HASH> 100644
--- a/lib/acts_as_paranoid/validations.rb
+++ b/lib/acts_as_paranoid/validations.rb
@@ -18,7 +18,11 @@ module ActsAsParanoid
         end
 
         relation = build_relation(finder_class, table, attribute, value)
-        relation = relation.and(table[finder_class.primary_key.to_sym].not_eq(record.send(:id))) if record.persisted?
+        if record.persisted?
+          [Array(finder_class.primary_key),Array(record.send(:id))].transpose.each do |pk_key, pk_value|
+            relation = relation.and(table[pk_key.to_sym].not_eq(pk_value))
+          end
+        end
 
         Array.wrap(options[:scope]).each do |scope_item|
           scope_value = record.send(scope_item)
corrected the uniqueness validation for models with composite primary keys