title: Django Queryset method .delete() not working
body: <p><strong>Correction:</strong> I've said the deletion doesn't work at all. That's wrong. It works most of times, for the same objects/records. It is just unstable: a few hundreds out of thousands of calls don't delete, despite there is no errors at all.</p>
  
  <p>So, this gonna be a very weird question, look at this case:</p>
  
  <pre><code>if 'locations' in bundle.data:
      bundle.obj.locations.all().delete()
      for i, loc in enumerate(bundle.data['locations'], start=1):
          loc['order'] = i
          bundle.obj.locations.create(**loc)
  </code></pre>
  
  <p>The second line just doesn't work. No errors, just no deletion at all. Then I tried this instead:</p>
  
  <pre><code>if 'locations' in bundle.data:
      cursor.execute("DELETE FROM bookings_bookinglocation WHERE booking_id='%s'" % bundle.obj.pk)
      connection.commit()
      for i, loc in enumerate(bundle.data['locations'], start=1):
          # ...
  </code></pre>
  
  <p>That above works better, but still frequently ignores the deletion.</p>
  
  <p>I know it is ignoring because in my many tests I had the attention enough to check for the IDs before and after the .delete() call and they are the same, as below:</p>
  
  <pre><code>if 'locations' in bundle.data:
      ids_before = bundle.obj.locations.values("id")
      bundle.obj.locations.all().delete()
      ids_after = bundle.obj.locations.values("id")
      # ...
  </code></pre>
  
  <p><strong>Config:</strong></p>
  
  <ul>
  <li>Django 1.6.5 (tried with 1.6.1 too)</li>
  <li>Postgres 9.3</li>
  <li><strong>ATOMIC_REQUESTS</strong> is True</li>
  <li>That is ran in <strong>save</strong> method in <strong>django-tastypie</strong>'s ModelResource.</li>
  <li>I tried with and without <strong>@transaction.non_atomic_requests</strong></li>
  <li>There's neither dependency on that table nor error is showing when I call the .delete()</li>
  <li>It's not delaying the deletion for the end of transaction. I've checked that</li>
  </ul>
  
  <p>Any idea? Thanks!</p>