Index: django/newforms/models.py
===================================================================
--- django/newforms/models.py	(revision 4995)
+++ django/newforms/models.py	(working copy)
@@ -35,19 +35,30 @@
     if form.errors:
         raise ValueError("The %s could not be changed because the data didn't validate." % opts.object_name)
     clean_data = form.clean_data
+    # If many-to-many data is given and the record doesn't exist in the
+    # database yet, the many-to-many data will be lost. This happens because
+    # many-to-many options cannot be set on an object until after it's saved.
+    if not commit:
+        many_to_many_data = False
+        for f in opts.many_to_many:
+            if clean_data.get(f.name):
+                many_to_many_data = True
+                break
+        if many_to_many_data:
+            try:
+                instance.__class__._default_manager.get(pk=instance._get_pk_val())
+            except instance.DoesNotExist:
+                raise ValueError("The %s could not be created because many-to-many data was provided for this unsaved record." % opts.object_name)
     for f in opts.fields:
         if not f.editable or isinstance(f, models.AutoField) or not f.name in clean_data:
             continue
         setattr(instance, f.name, clean_data[f.name])
     if commit:
         instance.save()
+    if instance._get_pk_val():
         for f in opts.many_to_many:
             if f.name in clean_data:
                 setattr(instance, f.attname, clean_data[f.name])
-    # GOTCHA: If many-to-many data is given and commit=False, the many-to-many
-    # data will be lost. This happens because a many-to-many options cannot be
-    # set on an object until after it's saved. Maybe we should raise an
-    # exception in that case.
     return instance
 
 def make_instance_save(instance):
