#3055: GenericRelation should squawk if pointed to a model that doesn't have a GenericForeignKey on it ---------------------------------------------------+------------------------ Reporter: pa...@elasticworld.org | Owner: nobody Status: new | Milestone: Component: Database layer (models, ORM) | Version: SVN Resolution: | Keywords: Stage: Accepted | Has_patch: 0 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | ---------------------------------------------------+------------------------ Changes (by carljm):
* summary: Deleting an object with two generic relations to different but related models (via a ForeignKey) apparently generates incorrect SQL => GenericRelation should squawk if pointed to a model that doesn't have a GenericForeignKey on it Comment: Jason's comment is correct. The SQL is wrong because the models are wrong. It's not legit to point a GenericRelation at a model which doesn't have a GenericForeignKey. However, the result should not be bad SQL when you try to delete; GenericRelations should fail fast if they are invalid. Updating the summary accordingly. -- Ticket URL: <http://code.djangoproject.com/ticket/3055#comment:3> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.