dpservis / bots

Automatically exported from code.google.com/p/bots
0 stars 0 forks source link

bug: handling of relations/foreign keys in configuration #162

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
when deleting eg a partner that is referenced in other objects (route, 
translation, etc) the reference is set to NULL in these objects.
That can lead to configuration errors:
- a partner-dependent translation will change to a non-partner dependent 
translation. This can lead to using the wrong translation.

In django < 1.3 all references/foreign keys are handled as cascaded deletes. 
That would not be OK. So the cascading deletes where disabled and all foreign 
keys where set to NULL.

In django 1.3 it can be indicated how to handle foreign keys for deletes.

So:
- use django default mechanism to handle foreign keys
- use django default confirmation for deletes & cascaded deletes; some deletes 
are not possible.
- basically bots-specific code to handle this has disappeared ;-)

Original issue reported on code.google.com by hjebb...@gmail.com on 22 Aug 2012 at 1:32

GoogleCodeExporter commented 8 years ago

Original comment by hjebb...@gmail.com on 31 Mar 2013 at 11:49

GoogleCodeExporter commented 8 years ago

Original comment by hjebb...@gmail.com on 10 Sep 2013 at 12:45