waliwali / ibm-db

Automatically exported from code.google.com/p/ibm-db
0 stars 0 forks source link

Potential data loss error with ManyToManyField on Django 1.4 #109

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
FYI

https://code.djangoproject.com/ticket/18284

From Ticket:
-------------
Attempts to save multiple values for a ManyToManyField? will only save one. It 
appears to follow the same pattern for bulk insert; delete all for parent 
record followed by a single insert. The form collects and passing down the 
appropriate clean_data, but only the first value is inserted in to the database.

This is a regression that will cause data errors for 3rd party db backends that 
have not (or cannot) enable the has_bulk_insert = True database feature. The 
core backends are unaffected because they have enabled the feature.

Discovered issue by using django-mssql. It'll no longer an issue as of 
django-mssql>=1.1a2. Version 1.1a1 added django 1.4 support, so no one should 
be using it on production yet. It's possible this regression only impacts 
django-mssql, but the SQLInsertCompiler is mostly a pass through to core.

A quick source check for django-pyodbc and ibm_db_django show that they have 
not enabled the feature.
-----------

Original issue reported on code.google.com by mman...@gmail.com on 7 May 2012 at 6:27

GoogleCodeExporter commented 9 years ago
Ticket can be closed. Non issue for this backend because it does not overwrite 
SqlInsertCompiler.as_sql.

Original comment by mman...@gmail.com on 7 May 2012 at 7:41

GoogleCodeExporter commented 9 years ago

Original comment by rahul.pr...@in.ibm.com on 8 May 2012 at 8:37