on delete set null

2009-03-16 Thread Thomas Guettler
Hi, I have a foreign key from MyModel to contrib.auth.models.User which can be null. Unfortunately if you delete the user, the MyModel instance gets deleted, too. I found an open ticket[1], but nevertheless don't know how to get the "on delete set null" done. One solu

WeakForeignKey - on delete set null rather than delete me

2009-02-09 Thread felix
he Event e is now deleted from the db any model with a ForeignKey will be deleted with the model it points to is deleted. which is exactly what ForeignKeys are supposed to do but my desired behavior here is to set: e.venue = None aka ON DELETE SET NULL its a weak relationship btw. this is not th