#15279: Inheritance of rel fields from a single abstract base class through multiple abstract classes causes errors. -------------------------------------+------------------------------------- Reporter: melinath | Owner: melinath Type: Bug | Status: new Milestone: | Component: Database layer Version: SVN | (models, ORM) Resolution: | Severity: Normal Triage Stage: Accepted | Keywords: Needs documentation: 0 | Has patch: 1 Patch needs improvement: 0 | Needs tests: 0 | Easy pickings: 0 -------------------------------------+------------------------------------- Changes (by melinath):
* needs_better_patch: 1 => 0 * needs_tests: 1 => 0 * easy: => 0 * needs_docs: 1 => 0 Comment: This version of the patch works a lot better. The tests actually test things, and the behavior is more consistent. However, I'm starting to wonder if this is really the way to go about this. I feel like I'm constantly struggling against the way that Options keeps track of fields. For example, I had to add code to the _fill_x_cache methods on Options to eliminate duplication there, because options.add_field isn't called for inherited fields. This makes sense, generally, since in the past, fields have not known what models they were attached to. However, since this patch introduces field-based tracking of both the model the field was first declared on and the first concrete model the field was present on, it would be possible to take that farther. Options could add every field on the model to a cache, then dish out local fields or inherited fields based on whether the options' model is the same as the first concrete model for the field. However, a change like that would be fairly invasive and far beyond the scope of this patch, nor am I convinced that it is the best course of action in terms of efficiency. -- Ticket URL: <https://code.djangoproject.com/ticket/15279#comment:6> Django <https://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-updates@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.