=== modified file 'django/db/models/base.py'
--- django/db/models/base.py	2010-05-11 13:06:03 +0000
+++ django/db/models/base.py	2010-07-02 14:36:45 +0000
@@ -498,9 +498,10 @@
                     # It does already exist, so do an UPDATE.
                     if force_update or non_pks:
                         values = [(f, None, (raw and getattr(self, f.attname) or f.pre_save(self, False))) for f in non_pks]
-                        rows = manager.using(using).filter(pk=pk_val)._update(values)
-                        if force_update and not rows:
-                            raise DatabaseError("Forced update did not affect any rows.")
+                        if values:
+                            rows = manager.using(using).filter(pk=pk_val)._update(values)
+                            if force_update and not rows:
+                                raise DatabaseError("Forced update did not affect any rows.")
                 else:
                     record_exists = False
             if not pk_set or not record_exists:

=== modified file 'tests/modeltests/force_insert_update/models.py'
--- tests/modeltests/force_insert_update/models.py	2008-08-20 18:50:06 +0000
+++ tests/modeltests/force_insert_update/models.py	2010-07-02 14:33:13 +0000
@@ -3,15 +3,47 @@
 automatic behaviour).
 """
 from django.db import models, transaction, IntegrityError
+from django.test import TestCase
 
 class Counter(models.Model):
-    name = models.CharField(max_length = 10)
+    name = models.CharField(max_length=10)
     value = models.IntegerField()
 
+class InheritedCounter(Counter):
+    tag = models.CharField(max_length=10)
+
+class ProxyCounter(Counter):
+    class Meta:
+        proxy = True
+
+class SubCounter(Counter):
+    pass
+
 class WithCustomPK(models.Model):
     name = models.IntegerField(primary_key=True)
     value = models.IntegerField()
 
+class InheritanceTests(TestCase):
+    def test_force_update_on_inherited_model(self):
+        a = InheritedCounter(name="count", value=1, tag="spam")
+        a.save()
+        a.save(force_update=True)
+
+    def test_force_update_on_proxy_model(self):
+        a = ProxyCounter(name="count", value=1)
+        a.save()
+        a.save(force_update=True)
+
+    def test_force_update_on_inherited_model_without_fields(self):
+        '''
+        Issue 13864: force_update fails on subclassed models, if they don't
+        specify custom fields.
+        '''
+        a = SubCounter(name="count", value=1)
+        a.save()
+        a.value = 2
+        a.save(force_update=True)
+
 __test__ = {"API_TESTS": """
 >>> c = Counter.objects.create(name="one", value=1)
 

